Andromeda
Note

HTML Anchor Links

Definition

Hyperlinks created with the <a> element and href attribute—the mechanism that makes the web a linked hypertext system, connecting pages, resources, email, phone numbers, and in-page fragments.

Why It Matters

They are the fundamental “hyper” in hypertext, creating the web’s interconnected graph of knowledge. Without the humble anchor link, the internet would be a collection of isolated silos rather than a global, navigable brain.

Core Concepts

<!-- External link -->
<a href="https://example.com">Visit Example</a>

<!-- Internal fragment link -->
<a href="#section-1">Go to Section 1</a>

<!-- Email link -->
<a href="mailto:info@example.com">Email Us</a>
  • Basic Link: <a href="url">text</a>; images link by nesting <img> inside <a>.
  • Default Styling: Blue underlined unvisited; purple visited (overridable with CSS).
  • Fragment Links: href="#id" jumps to element with matching id.
  • Cross-Page Fragments: href="page.html#section".
  • target="_blank": Opens new tab/window (use sparingly for accessibility).
  • mailto: / tel:: Launch email client or phone dialer on mobile.

Connected Concepts