Skip to content
Related Articles

Related Articles

Improve Article

HTML | <a> name Attribute

  • Last Updated : 24 Apr, 2020

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
        <a href="https://www.geeksforgeeks.org/"
                name="Geeks">
            GeeksforGeeks
        </a>
    </p>
</body>
  
</html>              

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

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :