Name

ID — NN n/a IE 4 HTML 4

Synopsis

ID=”elementIdentifier"

Optional

A unique identifier that distinguishes this element from all the rest in the document. Can be used to associate a single element with a style rule naming this attribute value as an ID selector. An element can have an ID assigned for uniqueness as well as a class for inclusion within a group. See Chapter 3.

If you assign an ID attribute and not a NAME attribute, the value of the ID attribute can be used as the applet’s name in script reference forms that use the element name (document.appletName).

Example

<APPLET ID="clocker" CODE="ScriptableClock.class" WIDTH=400 HEIGHT=50>
</APPLET>

Value

Case-sensitive identifier.

Default

None.

Object Model Reference

IE

[window.]document.applets[i].id

[window.]document.appletName.id

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.