Skip to content
Related Articles

Related Articles

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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>              

chevron_right


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

full-stack-img

My Personal Notes arrow_drop_up
Recommended Articles
Page :