English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <a> name attribute

<a> name attribute is used to specify the name of the anchor point (anchor).

HTML <a> tag

Online Example

The name attribute is used to specify the name of an anchor (anchor):

<!doctype html>
<html>
<head>
<title>html: <a> name attribute usage - Basic Tutorial(oldtoolbag.com)</title>
</head>
<body>
<p><a href="#C5">See Chapter Five</a></p>
<p>
<h2>Chapter One</h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2>Chapter Two</h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2>Chapter Three</h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2>Chapter Four</h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2><a name="C5">Chapter Five</a></h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2>Chapter Six</h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2>Chapter Seven</h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2>Chapter Eight</h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2>Chapter Nine</h2>
<p>This chapter explains the use of the <a> name attribute</p>
<h2>Chapter Ten</h2>
<p>This chapter explains the use of the <a> name attribute</p>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the name attribute

Definition and Usage

HTML5 The name attribute of the <a> tag is no longer supported. You can use the id attribute instead of name attribute.

The name attribute specifies the name of the anchor.

The name attribute is used to create bookmarks within the document.

Tip: In XHTML, the name attribute of the <a> tag has been deprecated and will be removed in the future. You can use the id attribute instead.

Syntax

<a name="value">

Attribute value

ValueDescription
anchor_nameAnchor name.

HTML <a> tag