HTML Links | Extraparse

HTML Links

October 05, 20231 min read133 words

Discover how to create hyperlinks in HTML to navigate between pages or external resources.

Table of Contents

Author: Extraparse

Hyperlinks are used to navigate between web pages or to external resources. They are created using the <a> (anchor) tag.

Syntax

1<!-- External Link -->
2<a href="https://www.example.com" target="_blank" rel="noopener noreferrer"
3 >Visit Example.com</a
4>
5<!-- Internal Link -->
6<a href="/about">About Us</a>
7<!-- Anchor Link -->
8<a href="#section1">Go to Section 1</a>
9<!-- Mailto Link -->
10<a href="mailto:someone@example.com">Send Email</a>
11<!-- Telephone Link -->
12<a href="tel:+1234567890">Call Us</a>
  • Descriptive Text: Use clear and descriptive link text that indicates the destination or action.
1<!-- Good -->
2<a href="/signup">Sign Up for Our Newsletter</a>
3<!-- Bad -->
4<a href="/signup">Click Here</a>
  • Avoid Using Generic Text: Refrain from using phrases like "read more" without context.
  • Use aria-labels When Necessary:
1<a href="https://twitter.com" aria-label="Follow us on Twitter">Twitter</a>
xtelegramfacebooktiktoklinkedin
Author: Extraparse

Comments

You must be logged in to comment.

Loading comments...