The name attribute on an <iframe> tag assigns a name to that iframe.
This name is used in form submission and as a reference in JavaScript.
A name attribute on an <iframe> element.
Click the link below to open its content in the named iframe.
<a href="https://www.wikipedia.org/wiki/Vincent_van_Gogh"
target="frame">Vincent Van Gogh</a> <br/> <br/>
<iframe name="frame" style="width:100%;height:450px;"
src="https://en.wikipedia.org/wiki/Main_Page"></iframe>
The name attribute assigns a name to the iframe.
The name is used as target by <a>, <form>, and <base> elements.
The name is also the browsing context of the iframe 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.
Finally, the name attribute can also be used as a reference by JavaScript.
<iframe name="name" />
Value | Description |
---|---|
name | String value. The iframe name. |
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 <iframe>