HTML | Object tag

The <object> tag is a HTML tag and used to display multimedia like audios, videos, images, PDFs, and Flash in web pages. It can also be used for displaying another webpage inside the HTML page.
The <param> tag is also used along with this tag to define various parameters. Any text that is written within <object> and </object> tags is considered as an alternate text that appears when the data specified is not supported by the browser.
This tag supports all Global and Event attributes of HTML.
Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
<head>
<title>Object Tag</title>
</head>
  
<body>
<center><h1>Object Tag</h1><br></center>
  
width="550px" height="150px">GeeksforGeeks</object>
  
</body>
</html>                                      

chevron_right


Output:
html object tag

The <object> tag has the following attributes:

Attribute Value Description
data URL It specifies the URL of data in the object.
type media_type It specifies the media type of data specified in the data attribute.
typemustmatch boolean It indicates that the resource should be embedded only if the value of the type attribute matches with the type of the resource provided on the data attribute.
align left, right, top, bottom It defines the alignment of the objects.
border pixels It specifies the border around the object.
height pixels It specifies the height of the object.
hspace pixels It specifies the whitespace on the left and right side of the object.
vspace pixels It specifies the whitespace on the top and bottom of the object.
height pixels It specifies the height of the object.
width pixels It specifies the width of the object.
name name It specifies the name for an object.
form form_id It specifies the form id to which the object element belongs to.


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.