class - HTML CSS HTML Global Attribute

HTML CSS examples for HTML Global Attribute:class

Introduction

The class attribute categorizes elements.

It is used with a CSS style.

The following code shows how to apply the class Attribute

Demo Code

ResultView the demo in separate window

<!DOCTYPE HTML>  
<html>  
    <head>      
        <title>Example</title>  
    </head>  
    <body>  
        <a class="class1 class2" href="http://java2s.com">web site</a>  
        <p/>  
        <a class="class2 otherclass" href="http://w3c.org">W3C web site</a>  
    </body>  
</html>  <!--  w w w .  j  a  v a 2  s  .com-->

Related Tutorials