Skip to: content, navigation

declare (HTML attribute)

Spec
Depr. Version
No HTML 4
Browser support (more…)
IE5.5+ FF2 SA3 OP9.2+
Full None None Full

Syntax

declare="declare"

Description

The declare attribute declares an object, but doesn’t instantiate it, which may be useful for the purposes of deferring the object’s download until it’s actually needed. In HTML, it’s not necessary to include the attribute and value pairing—all we need is the attribute on its own, as shown here:

<object data="giant-dog.jpg" declare
    type="image/jpeg" height="225"></object>

Example

Here’s the declare attribute, specified in XHTML-compliant markup:

<object data="giant-dog.jpg" declare="declare"
    type="image/jpeg" height="225"></object>

Value

"declare" is the only value this attribute can take.

Compatibility

Internet Explorer Firefox Safari Opera
5.5 6.0 7.0 1.0 1.5 2.0 1.3 2.0 3.0 9.2 9.5
Full Full Full None None None None None None Full Full

This element type isn’t particularly well supported and has limited practical value.

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

Search