HTML CSS examples for HTML Global Attribute:class
The class attribute categorizes elements.
It is used with a CSS style.
The following code shows how to apply the class Attribute
<!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-->