Common Attributes and Events
A number of attributes in the HTML 4.01 and XHTML 1.0 Recommendations are shared by nearly all elements. To save space, they have been abbreviated in this reference as they are in the Recommendations. This section explains each attribute’s shorthand and serves as a reference for the remainder of the element listing.
Core
When Core is listed under Attributes, it refers to the set of core attributes that may be applied to the majority of elements (as noted in each element listing):
idAssigns a unique identifying name to the element
classAssigns one or more classification names to the element
styleAssociates style information with an element
titleProvides a title or advisory information about the element
Internationalization
When Internationalization appears in the attribute list, it means the element accepts the set of attributes used to specify language and reading direction:
dirSpecifies the direction of the element (left to right or right to left).
langSpecifies the language for the element by its language code.
xml:langXHTML only. Specifies language for elements in XHTML documents.
Events
When Events is listed for the element, it indicates that the core events used by scripting languages are applicable to the element. Additional events that are not part of the core events are listed separately:
onclickOccurs when the pointing device button is clicked over an element
ondblclickOccurs when the pointing device button is double-clicked over an element
onkeydownOccurs ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access