Last Updated : 11 Jul, 2025
The <object> tag is used to display multimedia like audio, videos, images, PDFs, and Flash on 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 alternative text that appears when the data specified is not supported by the browser.
Note: The <object>
tag indeed supports Global Attribute and Event attributes, allowing for various attributes and event handlers to be applied.
Example 1: In this example, we will see the implementation of an object tag with an example.
HTML
<!DOCTYPE html>
<html>
<body>
<h1>HTML Object Tag</h1>
<!--HTML object tag starts here-->
<object data=
"https://media.geeksforgeeks.org/wp-content/cdn-uploads/Geek_logi_-low_res.png"
width="550px" height="150px">
GeeksforGeeks
</object>
<!--HTML object tag ends here-->
</body>
</html>
Output:
Example 2: In this example, we will see the implementation of an object tag with another example.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title>HTML Object Tag Example</title>
<style>
body {
text-align: center;
}
</style>
</head>
<body>
<h1>Embedding an Image Using <code><object></code> Tag</h1>
<object data=
"https://media.geeksforgeeks.org/gfg-gg-logo.svg"
type="image/png">
<img src=
"https://media.geeksforgeeks.org/gfg-gg-logo.svg"
alt="Placeholder Image">
</object>
</body>
</html>
Output:
Supported BrowsersRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4