The HTML class Attribute
class="style" is used to style an HTML element using the named style in an external or embedded stylesheet. If class attribute is not assigned the element will be styled using any nested styling information that may be found in the style specification for the parent element of the element. If there is no such information, the process will be repeated at the level of the grandparent element and so on. If all such efforts fail the element will get an intrinsic styling determined by the web browser.
Instead of, or in addition to, specifying the class attribute one can also define an inline style for the element using the code style="...".
▼Jump To...