HTML & CSS Masterclass Tutorial

Comprehensive guide to modern HTML and CSS development.

Links & Navigation

Links & Navigation

Hyperlinks are the glue that holds the Web together, allowing users to navigate from page to page.

The Anchor Tag <a>

Links are created using the anchor tag. The most important attribute is href (Hypertext Reference), which indicates the link's destination.

Types of Links

  • Absolute Links: Point to external websites (e.g., https://google.com).
  • Relative Links: Point to pages within your own website (e.g., /about.html).
  • ID Links: Point to a specific section on the same page (e.g., #contact-section).
  • Email Links: Open the user's email client (e.g., mailto:admin@example.com).

Use target="_blank" to open the link in a new tab.

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics