HTML and CSS Reference
In-Depth Information
with the codebase attribute. The browser determines the data type by
the type of object that is being inserted in the document.
This attribute is similar to the src attribute of the <img> tag, in that it
downloads data to be processed by the included object. The differen-
ce, of course, is that the data attribute lets you include just about any
file type, not just an image file. In fact, the <object> tag expects, but
doesn't require, that you explicitly name an enabling application for the
object with the classid attribute, or indicate the MIME type of the file via
the type attribute to help the browser decide how to process and render
the data.
For example, here is an image included as an object, rather than as an
<img> file:
<object data="pics/kumquat.gif" type="image/gif">
</object>
12.2.1.6. The type attribute
The type attribute lets you explicitly define the MIME type of the data
that appears in the file you declare with the data attribute. (Use codetype
to indicate an applet's MIME type.) If you don't provide data, or if the
MIME type of the data is apparent from the URL or is provided by the
server, you may omit this attribute. We recommend that you include it
anyway, to ensure that the browser handles your data correctly.
For examples of data MIME types, look in your browser preferences for
applications. There you'll find a list of the many file data types your
browser recognizes and the application, if not the browser itself, that
processes and renders that file type.
 
Search WWH ::




Custom Search