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.
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.