name attribute (a)
Sets the name of a target anchor.
Named anchors can be the targets of source anchors. If the href attribute of an anchor is set to the '#targetName' value, where the targetName is the value of an anchor's name attribute, then the first anchor (source) refers to the second anchor (target anchor). Clicking on the source anchor scrolls the target anchor into the visible area of the document. See the page for the href attribute or Example 1 for further details.
String that sets the name of the target anchor.
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the name attribute:
Did you find this example helpful?
Supported by tags:
User Contributed Comments