Name

CLASS — NN n/a IE 4 HTML n/a

Synopsis

CLASS=”className1[ ...classNameN]"

Optional

An identifier generally used to associate an element with a style sheet rule defined for a class selector. See Chapter 3. The CLASS attribute makes no sense for the HEAD element because the attribute can’t be assigned to a class style selector that has not yet been defined. (It gets defined later within the HEAD element.) This attribute appears to be in Internet Explorer for the sake of consistency, rather than genuine functionality.

Value

Case-sensitive identifier. Multiple classes can be assigned by separating the class names with spaces within the quoted attribute value.

Default

None.

Object Model Reference

IE

[window.]document.all.elementID.className

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.