Sets the style class or classes that belong to the element.
With this attribute you can assign Cascading Style Sheets (CSS) declarations to an element.
CSS is useful for adding styling behaviors to an element. For a complete list of style properties, please see the page for CSS properties.
String that sets a space-separated list of the related class names.
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the class attribute:
Did you find this example helpful?
Supported by tags:
User Contributed Comments