class Attributeclass Attributeclass is a Common Attribute from the
Core Attribute Collection
and is of Type NMTOKENS.
It may be used on most elements in the Element Index - all except: base, head, html, meta, param, script, style, title.
A class attribute may be given to almost any element in order to assign one or more class names to the
element.
Unlike the case of the id
attribute, the same class may be given to more than one element. In fact, the main use of the class
attribute is to group elements so that a single CSS rule may be applied to the entire group.
class attributes:
See also the id attribute.