Internet Explorer adds other attributes to the <object> element:
align accesskey alt code
datafld hidefocus notab type
unselectable
Note: only the align attribute is actually supported in IE 5.5 onwards, the rest are IE 4 only. Now let's look at these in turn:
align
The syntax for the align attribute in this context is slightly different from normal:
align="top | middle | bottom | left | right | absbottom* | texttop* |
absmiddle* | baseline*"
* For explanations of these values, please refer back to Chapter 5, and look at the section on the <img> element. This attribute is deprecated in HTML 4.01.
accesskey
This attribute defines the "hot-key" that can be used to activate the element, or switch the input focus to it. This is used where a hyperlink takes the form of an image, rather than a text string. For details of using an image as a hyperlink see Chapter 4. For more about the uses of the accesskey attribute, see Chapter 6.
alt
This defines a text alternative to the graphic. See Chapter 5 for more details.
code
This attribute defines the URL to the Java class file implementing the object, if this is the object source instead of an image. Its syntax is:
code="url"
datafld and datasrc
These attributes are used to connect the <object> element to a client-side cached data source in Internet Explorer 4, in a technique called data binding. These have since been removed in Internet Explorer 6. For a look at using these attributes, see the "<frame>" section of Chapter 8.
hidefocus
This attribute holds a value indicating whether or not the object is indicated visibly when the element is in focus. See Chapter 8 for more information.
notab
This attribute was present very briefly in Internet Explorer 3, but was dropped by the time of version 4. It was used to exclude an element from the tabbing order, but now this can be achieved by setting the tabindex attribute to -1.
type
This attribute defines the MIME type for the object, as defined in the registry on a Windows Machine. The syntax is:
type="mime-type"
where mime-type is a unique text string of a standard format, which tells the browser what kind of information the file contains, and which application to use to read or execute it - as appropriate. The MIME-types for popular image formats are "image/gif", "image/jpeg", and "image/png". This is overridden by the classid attribute.
unselectable
This attribute specifies that the element cannot be selected. The syntax is:
unselectable="on | off"
If it is set to off (the default), then the element can be selected. Setting it to on makes the object unselectable.