HTML object tag

Last Updated on April 26, 2023 by Roshan Parihar

HTML object tag is used to include the video, sound or other media files in the web pages.

Almost all the browsers support the object tag to show video or audio content.


Syntax

Output



This is the example for object tag that contains the video file to show with controls.

Output



This is the example for object tag that contains the image file to show image.

Output


List of HTML object tag attributes

Sr. No. Attribute options Description
1 height Used to specify the height of the object content.
2 width Used to specify the width of the object content.
3 data Used to specify the location of the content imported by the object.
4 type Used to specify the type of the content imported by the object.
5 form Used to specify the form id the object associated with.

Resources and References

1. W3C Specification.
2. HTML living standard
3. W3C project using Github