Skip to main content

The <a> Element

The <a> element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.

<a href="index.html">SimpleAccess Homepage</a> View HTML Living Standard: The a element

WCAG Best Practices: Link Purpose

To ensure links are accessible, the purpose of each link must be determinable from the link text alone, or from the link text together with its programmatically determined link context.

WCAG Requirement: Link Purpose

Success Criterion 2.4.4 (Level A): The purpose of each link can be determined from the link text alone or from the link text together with its programmatically determined link context.

Understand SC 2.4.4: Link Purpose

Visual Indicators & Contrast

Links must be visually distinct from regular text. Relying on color alone to distinguish a link is a failure of accessibility standards.

WCAG Requirement: Use of Color

Success Criterion 1.4.1 (Level A): Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.

Best Practice: Always use underlines or a secondary visual marker (like an icon) for links within body text.

Understand SC 1.4.1: Use of Color

Interactive Protocols

Beyond standard URLs, anchors support specialized protocols for device interaction:

<a href="mailto:support@simpleaccess.io">Email Support</a> <a href="tel:+15550001234">Call Support</a>