Home HTML HTML Links

HTML Links

Beginner ⏱ 6 min read Updated: Jul 2026
  • HTML links are used to navigate from one page to another
  • Links are created using the <a> (anchor) tag
  • The href attribute defines the destination URL
  • Links are a key part of website navigation and SEO
  • They can link to pages, sections, images, or external websites

Why HTML Links are Important?

🔗
HTML links connect web pages together and help users and search engines navigate your website. Proper linking improves SEO ranking and user experience.

Basic HTML Link Syntax

Example

<a href="https://example.com">Visit Example</a>
            
Result

HTML Link Attributes

href

Specifies the URL of the page you want to open.

target="_blank"

Opens the link in a new tab or window.

title

Provides extra information when hovering over a link.

Link Attributes Example

Example

<a href="https://example.com">
Open Example Website
</a>

Types of HTML Links

Absolute URL

Full web address including domain name (https://example.com).

Relative URL

Links within the same website (about.html, contact.html).

Anchor Link

Links to a specific section on the same page (#section1).

Example of Different Links

Example

<a href="https://google.com">Google</a>

<a href="about.html">About Page</a>

<a href="#section1">Go to Section</a>
            

SEO Benefits of HTML Links

✔ SEO Advantage: Internal linking helps search engines understand site structure, improves page ranking, and increases user engagement.

Key Takeaways

  • Use <a> tag to create links
  • Always use proper href values
  • Use internal links for SEO improvement
  • Use target="_blank" for external links
  • Links are essential for website navigation