The Link: <a href="...">
The Link: <a href="...">
~7 Min. Lesezeit Zuletzt aktualisiert am August 8, 2026
Links are what makes the "World Wide Web" a web in the first place: pages connected to each other. Without links, you'd have to type in the exact address for every single website yourself. In this chapter you'll learn the element that changes that: <a> ("anchor").
The basic structure of a link
<a href="https://www.fifa.com">FIFA</a>Two things are new here, and both are important to understand:
- The text between
<a>and</a>is what the user sees and can click - here, "FIFA". hrefis an attribute: extra information you attach directly to the opening tag.hrefstands for "hypertext reference" and holds the address the link should lead to.
What is an attribute?
An attribute is an extra property you attach to a tag, always following the same pattern: name="value", inside the opening tag, before the closing angle bracket. You've actually already seen this without us naming it: <html lang="en"> - there, lang is the attribute and "en" is the value. A tag can have several attributes at once, separated by spaces. You'll meet many more attributes throughout this tutorial - href is the first, and one of the most important.
Tipp: An attribute's value always goes in quotes. Both href="..." with double quotes and href='...' with single quotes work, but we'll use double quotes consistently throughout this tutorial, since that's the most common convention.
Trying out a link
Add a link to Finn's club to his website:
<h2>My Club</h2>
<p>I play for Sample Town FC. More info can be found on the
<a href="https://www.fifa.com">FIFA website</a>.</p>Save, reload the page in your browser, and click the link. You should notice: browsers automatically display links as blue and underlined, and the mouse cursor turns into a small hand when hovering over them.
Achtung: Common beginner mistake: forgetting the = in the attribute, or forgetting the quotes (so href https://... instead of href="https://..."). The browser often won't show any error at all, but the link simply won't work correctly - so when in doubt, compare your spelling closely with the example.