Summary: <object> Tag and Attributes - Web Team Procedures and Notes

This page is intended for use only by the Web Team.

<object style="width:240px; height:70px" data="LINK" type="text/html" standby="Loading&hellip;"></object> 

Attributes for the <object> tag:

  • data - The URL of the object (required).
  • width - Width of object. Use CSS instead.
  • height - Height of object. Use CSS instead.
  • standby - Text to display when loading.
  • archive - The URL for archived versions.
  • name - The name of the object if you are using it in JavaScript/VBScript or some other scripting language.
  • type - The MIME type of the object (required). See MIME Reference on W3Schools.
    Just a Few MIME Types
    MIME Type File Type / Extension
    text/html html, htm
    application/msword doc (docx?)
    application/pdf pdf
    application/rtf rtf
    application/ xls
    application/ ppt
    application/x-director dcr
    application/x-mspublisher pub
    application/x-shockwave-flash swf
    audio/mpeg mp3
    text/plain txt
    video/mpeg mpg, mpeg
    video/quicktime mov, qt
    video/x-msvideo avi
    video/x-ms-wmv wmv
  • May be incompatible with browsers - "From personal experience, adding those attributes will only render it in Internet Explorer."
    • classid - Defines a ClassID in the registry.
    • codebase - Defines where the code is for the object??
    • codetype - The MIME type for the code in the above 2 values??
  • Deprecated - Use CSS instead:
    • align - Aligns the object.
    • border - The border around the object.
    • hspace/vspace - Margins around the object.

(Source: Juggling An Iframe Box With Xhtml Sites.)

General References