New Element Attributes
Practically every existing element has one or more new attributes in HTML 4.0. Many of these new attributes are applied to every element due to HTML 4.0’s focus on internationalization, accessibility, style sheets, and scripting. Table 7.3 lists the common attributes that have been added to most elements that can act as content containers (that is, they have start and end tags). Element-specific additions are not shown here, but are covered in full in Chapter 8.
Table 7-3. New HTML 4.0 Attributes Shared by Most Elements
Attribute |
Description |
---|---|
|
Group identifier (selector) for applying a style rule |
|
Text direction of the element’s content |
|
Unique identifier (selector) for applying a style rule |
|
Human language used in the element’s content |
|
Inline style sheet rule |
|
Short description of the element |
|
Event handler for click events |
|
Event handler for double-click events |
|
Event handler for keyboard key down events |
|
Event handler for keyboard key press (down and up) events |
|
Event handler for keyboard key up events |
|
Event handler for mouse down events |
|
Event handler for mouse movement inside the element |
|
Event handler for mouse movement out of the element |
|
Event handler for mouse movement into the element |
|
Event handler for mouse up events |
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.