VOOZH about

URL: https://www.geeksforgeeks.org/html/html-a-name-attribute/

⇱ HTML <a> name Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <a> name Attribute

Last Updated : 12 Jul, 2025

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 JavaScript.

Note: The <a> name attribute is not supported by HTML5.

Syntax

<a name="name"> 

Attribute Values:

Attribute Value

Description

name

It describes the name of the <a> element.

Example: This example illustrates the use of an anchor name attribute in an HTML document.

Output:

👁 Image

Related DOM Property:

Supported Browsers:

  • Google Chrome 1
  • Edge 12
  • Firefox 1
  • Opera 15
  • Apple Safari 1
Comment
Article Tags: