Learn How to Create Links & Anchors in HTML

image of blog Mukesh Saini

HubSpot CMS Developer

Anchor Tag in HTML
1 Minutes Read

Listen to the Blog

Learn How to Create Links & Anchors in HTML
1:06

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:

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

I'm Mukesh Saini, a seasoned HubSpot CMS Developer specializing in custom templates, seamless integrations, and high-performing digital experiences. Having honed his skills over several years in the industry, i possess a deep understanding of HubSpot's capabilities.

HubSpot CMS Developer

Frequently Asked Questions

Can links open in the same tab? +
Yes! just omit target="_blank" to open in the same window.
Can I link to a specific paragraph on another page? +
use an id on the target element and link like page.html#target-id.
Are email and phone links supported on all devices? +
Most modern browsers and devices support them. Mobile devices open the dialer or email app automatically.
How do I make links visually stand out? +
Use CSS for color, hover effects, and text decoration.
cm-vector

Have a specific need or challenge in mind? Let’s discuss how we can support your goals.

Get Started Today

Ready to streamline your Hubspot CRM, website, or RevOps !