- HTML Course
- HTML Tutorial
- HTML Document Structure
- HTML Root Tags
- HTML Flow Tags
- HTML Interactive Tags
- HTML Basic Tags
- HTML Paragraph
- HTML Line Break
- HTML Horizontal Line
- HTML Images
- HTML Data Types
- HTML Attributes
- HTML Character Entities
- HTML Styles
- HTML Formatting Text
- HTML Logical Style Text
- HTML Organizing Text
- HTML List
- HTML Tables
- HTML Forms
- HTML action Attribute
- HTML Multimedia
- HTML Quiz
- HTML Online Quiz
HTML OBJECT Tag
HTML uses the OBJECT tag to include objects, such as images, audios, videos, Java applets, ActiveX controls, Portable Document Format (PDF), and Flash objects, in a Web page.
The OBJECT tag allows you to specify the code that can be used to display or manipulate that data.
An OBJECT tag can also be used inside the BODY tag. The text between the starting and the ending tags of the OBJECT tag is the alternate text for browsers that do not support this tag.
Attributes of OBJECT Tag
The following table shows various attributes of the OBJECT tag.
Attribute | Description |
---|---|
data | Specifies the URL of the object's data |
form | Specifies one or more forms to which the object belongs |
height | Specifies the height of the object in pixels |
name | Specifies the object's name |
type | Specifies the MIME type for the component |
usemap | Specifies the URL |
width | Sets the width of the embedded components in the page |
The OBJECT tag initializes the object by passing the parameters to the object, which can be done using the PARAM tag.
In HTML, you can use the PARAM tag to define parameters or variables for an OBJECT tag. An OBJECT tag can contains multiple PARAM tags, as shown in the following code snippet.
<OBJECT data="movie.avi" type="video/quicktime" id="video" width="200" height="100"> <PARAM name="BorderStyle" value="1" /> <PARAM name="autoplay value=true /> </OBJECT>
In the above code snippet, we have defined an OBJECT tag, which includes a video file in a Web page. We have also used the PARAM tags to pass the parameters for the OBJECT tag.
Attributes of PARAM Tag
The following table shows the various attributes of the PARAM tag.
Attribute | Description |
---|---|
name | Specifies the name of the parameter |
value | Specifies the value of the parameter |
« Previous Tutorial Next Tutorial »
Follow/Like Us on Facebook
Subscribe Us on YouTube