HTML and CSS Reference
In-Depth Information
8.1.1
]
[
Style Classes, 8.3
]
12.2.1.8. The declare attribute
The
declare
attribute lets you define an object but restrains the browser
from downloading and processing it. Used in conjunction with the
name
attribute, this facility is similar to a forward declaration in a more con-
ventional programming language that lets you defer download of an ob-
ject until it actually gets used in the document.
12.2.1.9. The id, name, and title attributes
Use the
id
or
name
attribute to uniquely label an object. Use the
title
at-
tribute to simply title the tag. Each attribute's value is a text string. The
browser may choose to display a title to the user or may use it in some
other manner while rendering the document. Use
id
or
name
to reference
the object in other elements of your document, including hyperlinks and
other objects.
For example, suppose you have two clock applets in your document,
along with two applets the user operates to set those clocks. Provide
unique labels for the clock applets using the
name
or
id
attribute, then
pass those labels to the setting applets using the
<param>
tag, which we
discuss later in this chapter in
section 12.2.2
:
<object classid="clock.class" id="clock1">
</object>
<object classid="clock.class" id="clock2">
</object>
<object classid="setter.class">
<param id="clockToSet" value="clock1">
</object>
<object classid="setter.class">
<param id="clockToSet" value="clock2">
</object>