What Is an HTML Object?

Article Details
  • Written By: Eugene P.
  • Edited By: Angela B.
  • Last Modified Date: 12 January 2020
  • Copyright Protected:
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Researchers have developed an online game that helps people become more aware and more skeptical about "fake news."  more...

January 17 ,  1946 :  The United Nations Security Council held its first meeting.  more...

In the HyperText Markup Language (HTML), the object tag is used to embed some type of file — such as an image, video, web page or applet — into a web page so it will display properly. The HTML object tag is a mechanism that specifically was designed to allow the inclusion of a generic object in an HTML document without requiring that the browser or the HTML language be aware of the format or content of the object. Through the use of different parameters — such as data, codebase and type — the plug-in, server or program that is required to view the HTML object can be defined and, with the param option, any additional information can be passed to the decoding application, including a filename, password or screen resolution. With the inclusion of the HTML object tag in the HTML language standard, other tags that previously were used to define certain object formats were depreciated to create more uniform code.


The HTML object tag was created and added to the HTML language specification version 4 as a generic mechanism to include currently existing media formats and files, as well as creating a framework for including any future types of new media. Technically, the HTML object tag can be used to place an image in a website, just like the img tag, or to embed video, music or a web-based application. The reason why the tag originally was created was to avoid situations such as the HTML applet tag, which is an entire language tag that can only be used to embed a Java® applet in a website. To avoid someday having to add additional format-specific tags for media types that might not be invented yet, a single generic object tag was created.

There are many ways to use the HTML object tag. At the most basic level, it can be used to define a file and then the format, or type, of file, as could be the case with an image. If the object type is recognized by the web browser, then the browser or its plug-ins can take over rendering of the object. Alternately, the codebase, classid, and codetype parameters of the tag can be used to define the location of an application or resource that is capable of interpreting the object data. This means that, if a new type of video format is placed on a website, the location of the decoder can be included in the object’s parameters, allowing the object to be decoded and displayed easily without the need for JavaScript® or other external language elements.

Beyond the core functionality of the HTML object tag, other parameters can be used to help determine formatting and other attributes. The width and height of an object can be defined so the rest of the page can be properly formatted without first loading the object. Standby text can be defined so the viewer of a website can see some text in the object area while it is loading. Any number of param tags can be placed inside the HTML object tags so additional information that is useful to the target decoding application can be defined.


You might also Like


Discuss this Article

Post your comments

Post Anonymously


forgot password?