<htmlstart/>

Links

The a element creates clickable hyperlinks.

Creating Links

The <a> (anchor) tag creates a hyperlink. The href attribute sets the destination.

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

<!-- Internal link -->
<a href="/about">About us</a>

<!-- Opens in new tab -->
<a href="https://example.com" target="_blank" rel="noopener">Open in new tab</a>

<!-- Email link -->
<a href="mailto:hello@example.com">Email us</a>

<!-- Phone link -->
<a href="tel:+911234567890">Call us</a>

<!-- Anchor to section on same page -->
<a href="#contact">Jump to contact</a>
<section id="contact">...</section>
Always add rel="noopener" when using target="_blank" — it prevents the new tab from accessing your page via window.opener.
🧩

Test Yourself

4 questions
Q1.Which attribute sets the destination URL on a link?
Q2.What does target="_blank" do?
Q3.Which href value links to a section on the same page?
Q4.Which href value starts an email client?