Name
<a>
Synopsis
<a> ... </a>
Create a hyperlink (href
attribute) or fragment
identifier (name
attribute) within a document.
Attributes
-
accesskey
=char
Define the hot-key character for this anchor.
-
charset
=encoding
Specify the character set used to encode the target.
-
coords
=list
Specify a list of shape-dependent coordinates.
-
href
=url
Specify the URL of a hyperlink target (required if not a name anchor).
-
hreflang
=language
Specify the language encoding for the target.
-
name
=string
Specify the name of a fragment identifier (required if not a hypertext reference anchor).
-
rel
=relationship
Indicate the relationship from this document to the target.
-
rev
=relationship
Indicate the reverse relationship of the target to this document.
-
shape
=shape
Define the region’s shape to be
circ
,circle
,poly
,polygon
,rect
, orrectangle
.-
tabindex
=value
Define the position of this anchor in the document’s tabbing order.
-
target
=name
Define the name of the frame or window to receive the referenced document.
-
type
=type
Specify the MIME type of the target.
Example
To create an anchor named info
at some point in a
document called doc.html, use the
<a>
tag with the name
attribute:
<a name="info" >Information</a>
To provide a hyperlink to that point in
doc.html, use the <a>
tag with the href
attribute appending the anchor
name to the filename using a hash mark (#
):
<a href="doc.html#info" >Link to information</a>
Get Webmaster in a Nutshell, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.