Blog

Learn How to Create Links & Anchors in HTML

Written by Mukesh Saini | 12 Dec, 2025 11:30:00 AM

Add navigation and interactivity to your web pages with links.

What Are Links in HTML?

Links (or anchors) are the way users navigate between pages or access external content.

  • <a> Anchor tag for links
  • href Attribute defining the URL or target location

Linking to External Websites

  • Use absolute URLs for external websites
  • target="_blank" opens the link in a new tab

Linking Within Your Own Website

  • Use relative URLs for internal pages
  • Helps organize multi-page websites efficiently

Anchors for Page Sections

You can create jump links within a page:

Go to Contact

Contact Us

Reach out via email or phone.

id attribute identifies the target section

Linking Emails, Phone Numbers & Files

The <a> tag defines a hyperlink that can link to another page, open an email, make a phone call, or download a file.

Email:

Phone:

Call Us

Download Files:

Styling Links

Links can be styled with CSS

a { color: blue; text-decoration: none; } a:hover { color: red; text-decoration: underline; }

Improves visibility and user experience