Name

a — <a> . . . </a>

Defines an anchor within the document. An anchor is used to create a hyperlink to another document or Internet resource. It can also serve to label a fragment within a document (also called a named anchor), which serves as a destination anchor for linking to a specific point in a document.

Attributes

Core, Internationalization, Events, Focus

charset="charset"

Specifies the character encoding of the target document.

coords="x,y coordinates"

Specifies the x-,y-coordinates for a clickable area in an image map. The HTML 4.01 Recommendation proposes that client-side image maps be replaced with an object element containing the image and a set of anchor elements defining the “hot” areas (with shapes and coordinate attributes). This system has not yet been implemented by browsers.

href="URL"

Specifies the URL of the destination document or web resource (such as an image, audio, PDF, or other media file).

hreflang="language code"

Specifies the base language of the target document.

id="text"

Gives the link a unique name (similar to the name attribute) so that it can be referenced from a link, script, or stylesheet. In XHTML, the id attribute is required for document fragments. For backward compatibility with version 4 browsers, authors use both name and id for fragments.

name="text"

HTML only. XHTML documents use id for document fragments. Places a fragment identifier within an HTML document.

rel="relationships"

Establishes one or more relationships between the current document and ...

Get HTML and XHTML Pocket Reference, 3rd 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.