The name attribute on an <object> tag assigns a name to that object element.
This name is the browsing context of the element.
A name attribute on an <object> element.
The name represents the browsing context of the element (see details below).
<object data="/media/sample.pdf" type="application/pdf"
style="width:100%;height:500px;" name="sample-pdf">
PDF cannot be displayed.
</object>
The name attribute assigns a name to the object element.
The name is the browsing context of the object element. The browsing context can be thought of as a mini-browser inside the browser. It has session history, a Document object, and more -- much like a browser does.
The name attribute can also be used as a reference by Javascript.
<object name="name">
Value | Description |
---|---|
name | String value. The browsing context of the object. |
Here is when name 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>