You are here: Reference > HTML > attributes > name (frame, iframe)

name attribute (frame, iframe)

Browser support:
Sets the initial name of the contained window.
The name of a window can be used to identify the window. If the target attribute of an anchor is set to the name of a window, then clicking on the anchor opens the referred page in the window.
Note: in JavaScript, the name of a window can be modified after the window is created. If you need detailed information about named windows, please see the page for the name (window) property.
JavaScript page for this attribute: name. You can find other example(s) there.

Possible values:

String that sets the initial name of the contained window.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the name attribute:
Code
frame.htm
<a id="myAnchor" href="frame.htm" target="TargetFrame">Click on it!</a>
<iframe name="TargetFrame" src="" height="150px" width="200px"></iframe>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content