HTML and CSS Reference
In-Depth Information
Required Attributes
The object element doesn't require any attributes. A data attribute is usually required to provide the
resource's address, unless that address is provided in a nested param element instead.
Optional Attributes
data : The URL of the external resource to embed.
type : The content type of the embedded resource (also called a MIME type). This attribute's
value should match the resource's actual content type; a content type mismatch may cause the
browser invoke the wrong plug-in to handle the content, and the content may not work.
name : Provides the object's browsing context, primarily if the embedded object is another HTML
document (see ).
form : Specifies the ID of the form element with which the object is associated (if it's associated
with a form). You'll learn more about forms in HTML in Chapter 8.
width : The width of the object in pixels.
height : The height of the object in pixels.
usemap : Identifies a client-side image map to be used, if the object is an image (see Chapter 6 to
learn more about image maps).
typemustmatch : A Boolean attribute that, when present, indicates that the resource specified in
the data attribute must match the content type specified in the type attribute; if the resource
doesn't match the type, it shouldn't be used or displayed. This is most useful when you're
embedding external content from a source you can't control and may not trust, to help prevent the
remote host from passing through any malicious code. This attribute can only be present if both
the data and type attributes are present as well.
A param element appears within an object element to define various object parameters and pass along
additional information for the object to use. A single object can contain multiple param elements, though
they must appear first before any other nested content. The param element can only appear as a child of
an object element. This is a void element with no contents and no end tag. It requires a name attribute
and optionally (though usually) features a value attribute as well. This is a multi-purpose element that
represents nothing on its own, and actual usage will depend entirely on the particular object you're
Required Attributes
name : The name of the parameter.
Search WWH ::

Custom Search