naming the iframe


<iframe src="" name="">

Browser
Internet Explorer Firefox Opera
Type
Inline-block

The name attribute of the IFAME element defines a unique name for the iframe.


<iframe src="example.html" name="test"> - </iframe>


Attribute Value Explanation
name=" " frame name arbitrary name

Frame name

  • Frame names must start in the alphabet.
    name="a001"
  • The following symbols can be included in a frame name.
    hyphen(-), underscore(_), colon(:), period(.)
    name="frame_name"

Example

<ul>
<li><a href="iexample_a.html" target="top">The red page opens in the top frame</a></li>
<li><a href="iexample_b.html" target="top">The green page opens in the top frame</a></li>
<li><a href="iexample_c.html" target="top">The yellow page opens in the top frame</a></li>
</ul>

<ul>
<li><a href="iexample_a.html" target="bottom">The red page opens in the bottom frame</a></li>
<li><a href="iexample_b.html" target="bottom">The green page opens in the bottom frame</a></li>
<li><a href="iexample_c.html" target="bottom">The yellow page opens in the bottom frame</a></li>
</ul>

<p><iframe src="iexample_a.html" width="300" height="80" name="top">Alternate content</iframe></p>

<p><iframe src="iexample_a.html" width="300" height="80" name="bottom">Alternate content</iframe></p>
Output