The data
attribute on an <object> tag specifies the URL or path of the resource to be embedded into the page.
The resource may came from the same or another website.
A data
attribute on an <object> tag.
The attribute value specifies a pdf file.
<object data="/media/sample.pdf" type="application/pdf"
style="width:100%;height:500px;">
PDF cannot be displayed.
</object>
The data
attribute specifies the URL or path of the resource file to be embedded into the page.
This attribute accepts any of these URLs:
<object data="URL">
Value | Description |
---|---|
URL | URL or path of a resource. |
Here is when data
support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |
Back to <object>