The Wayback Machine - https://web.archive.org/web/20211208140654/https://www.geeksforgeeks.org/html-object-data-attribute/
Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | <object> data Attribute

  • Last Updated : 30 Apr, 2019

The <object> data Attribute in HTML is used to specify the URL of the Embedded file of an Object.

Syntax:

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

<object data="URL">

Attribute Values: It contains single value URL which is used to specify the source of the object.
The possible value of URL are:

  • absolute URL: It points to another website.
  • relative URL: It points to a file within a website.

Example:




<!DOCTYPE html> 
<html> 
  
<head> 
    <title>
        HTML <object>' data Attribute
    </title> 
</head> 
  
<body> 
    <center>
        <h1>GeeksForGeeks</h1> 
          
        <h1>
            HTML <object>data Attribute
        </h1> 
        <br> 
       
        <object data= 
                width="550px" height="150px"> 
            GeeksforGeeks 
        </object> 
    </center>
</body> 
  
</html>                    

Output:

Supported Browsers: The browser supported by HTML <Object> data Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!