O'Reilly logo

HTML & XHTML Pocket Reference, 4th Edition by Jennifer Niederst Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Common Attributes and Events

A number of attributes are shared by nearly all elements. To save space, they have been abbreviated in this reference as they are in the Recommendations. This section serves as a reference for Alphabetical List of Elements and explains each attribute’s shorthand.

In HTML 4.01/XHTML 1.0, the attributes and events are divided into groups called Core, Internationalization, Focus, and Events. In HTML5, there is one set of Global Attributes that applies to all HTML elements.

HTML 4.01 and XHTML 1.0

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):

id

Assigns a unique identifying name to the element

class

Assigns one or more classification names to the element

style

Associates style information with an element

title

Provides 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:

dir

Specifies the direction of the element (left to right or right to left).

lang

Specifies the language for the element by its language code.

xml:lang

XHTML only. Specifies language for elements in XHTML documents.

Focus

Focus refers to the state of being highlighted and ready for user input, such as for a link or form element. When Focus is listed, it indicates that the following attributes and events related to bringing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required