HTML | <a> name Attribute
The HTML anchor name attribute is used to specify the name for an <a> element. It is used to reference the form-data after submitting the form or to reference the element in a JavaScript.
Syntax:
<a name="name">
Attribute Values: It contains a single value name which describes the name of the <a> element.
Example:
<!DOCTYPE html> < html > < head > < title >HTML a name attribute </ title > </ head > < body > < h2 > HTML < a > name attribute </ h2 > < p >Welcome to name = "Geeks" > GeeksforGeeks </ a > </ p > </ body > </ html > |
chevron_right
filter_none
Output:
Supported Browsers: The browsers supported by HTML <a> name attribute are listed below:
- Google Chrome 1.0
- Firefox 1.0
- Edge 2.0
- Opera 1.0
- Apple Safari 1.0