HTML object tag

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 optionsDescription
1heightUsed to specify the height of the object content.
2widthUsed to specify the width of the object content.
3dataUsed to specify the location of the content imported by the object.
4typeUsed to specify the type of the content imported by the object.
5formUsed to specify the form id the object associated with.

Resources and References

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

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.