Loading…
Links are the backbone of the web — they let users jump between pages and sites. Without links, every page would be a dead end!
<a href="https://example.com">Click here</a>
| Part | Meaning |
|---|---|
| <code><a></code> | The anchor element |
| <code>href</code> | Hypertext Reference — the destination URL |
| Content | The clickable text the user sees |
| Type | href Example | Use Case |
|---|---|---|
| External | <code>https://google.com</code> | Other websites |
| Internal | <code>/about.html</code> | Pages on your own site |
| Section | <code>#contact</code> | Jump to a section on the same page |
| <code>mailto:hi@example.com</code> | Open the user's email app |
Screen readers often read links out of context, so make the text meaningful:
Inside the <nav> element, create three links:
https://google.com with text "Google"#about with text "About Us"mailto:hello@example.com with text "Contact"