<a href="#"><a name="">
Browser |
|
---|---|
Type |
The A element defines an anchor.
You can create a link to a named anchor by using the name attribute (or the id attribute).
When linking within the same document, the A element is set as follows.
<a href="#Anchorname">linked text</a>
(Target point)
<a name="Anchorname">a named anchor</a>
Attribute | Value | Explanation |
---|---|---|
href=" " | #anchor name | a number sign (#) and the anchor name |
name=" " | anchor name | arbitrary name |
- Create a named anchor
-
- Anchor names must be unique within a document.
- Anchor names are case-sensitive.
- The following symbols can be included in an anchor name.
hyphen(-), underscore(_), colon(:), period(.)
name="anchor_name" - Anchor names must start in the alphabet.
name="a001"
- Link to a named anchor
-
- Type a number sign (#) and the name of the anchor.
href="#a001"
- Type a number sign (#) and the name of the anchor.