in ,

What are a href Links? HTML Links Explained

what-are-a-href-links?-html-links-explained

User experience (UX) has become a critical Google ranking signal, so it’s more important than ever to ensure your website is up to par. Good navigation contributes to a user’s experience, so it’s best to stay on top of the hyperlinks featured on your site. 

Hyperlinks allow users to “travel” from page to page. You’ll know these links are active when your mouse cursor changes from an arrow to a hand when hovering over the link. You can attach HTML links to various page elements, including text, images, and more.

In this guide, we’ll explore how hyperlinks (known as “HTML links” or “a href links”) work, why it’s important to stay on top of your hyperlinks, and how to find and fix bad hyperlinks with the Site Audit tool.

WebCEOSEO Tools

Users search the internet with purpose; they’re looking for answers, products, guidance, and more. Thanks to your SEO efforts, Google has put you in their sights. 

Once you’ve captured a visitor, you need to guide them through your website with ease so their user experience is pleasant. Your HTML links are vitat to guiding your user from one page on your website to another.

Good HTML links increase a user’s session time and can lead to more pages visited per session – two metrics that are important to web analytics. 

Link text or object.

The “href” is an essential attribute of the element; it determines the link’s destination. 

The href attribute link (short for “Hypertext REFerence”) indicates the relationship between pages to search engines.

href is an attribute of the anchor tag and contains two components:

  1. The URL (the actual link) and 
  2. The clickable text or object that users will see on the page (known as the “anchor text)

For example:

Visit Semrush!

Relative vs. Absolute URLs

Your URL structure can contribute to how Google is able to effectively crawl your website. You’ll likely use one of the two common URL structure types: relative and absolute.

Relative links use part of the URL, and are mainly reserved for internal linking where the link is on the same site and therefore part of the same root domain. They look something like this:

hreflang attribute 101. 

 However, an absolute link uses the full website link, including the domain name of the site:

Visit Semrush!. 

When to use Relative URLs

You use relative URLs when you want to link to a page on your website. You’ll use the “slug” of your URL in the link. 

Some pros of using relative URLs include:

  • Quick transfer to a new domain (you won’t need to update each URL)
  • Faster page load times (a Google ranking factor

When to use Absolute URLs

If you’re sending your user to an external page (i.e. away from your website), you’ll use an absolute URL. 

Some benefits to using absolute URLs include:

  • The link points to the correct URL all the time (Google will always know where to go)
  • Google site crawlers can scan these URLs easier (important for indexing) 

There are a few ways you can use hyperlinks to create an easy navigational experience on your website. Think of links as connections between one resource and another, whether web pages, documents, forms, etc. 

Let’s look at the most common types of hyperlinks you’ll find on a website:

  1. Image links: You can hyperlink an image to another resource. For example, you’d hyperlink an image of a product to its product page.

You’ll likely use a linking structure similar to this:





  1. Email and phone links: You’d use these links when you’d want the user to contact you directly. On mobile, these types of links point users to a direct action: calling your phone number or drafting an email to you.

    For an email address, you add mailto: inside your href attribute as follows:

Semrush email

For a phone number, you add tel: inside your href attribute:

+61 1800 934 242

  1. Button links: Hyperlinked buttons are a popular web design feature, and are useful to add a call to action (CTA) to your site. CTAs tell your users what to do: contact us, download a brochure, read more, etc.

    One way to add a link to a button is to wrap a button element in a link: 

Hreflang Attributes

Hreflang attributes indicate the relationship between pages in different languages on your website to search engines. If your website targets a multinational audience, you’ll need to add hreflang attributes. 

Here are a few examples:


When the Google bots try to scan your website, they will likely stop move on if they find multiple broken links. As a result, it’ll be harder and take much longer to index your website, if Google chooses to at all. 

The Site Audit tool can help you to identify any errors with links on your website. It includes over 120 technical and on-page checks that spot common errors.

You’ll need to create a project for your domain before using the Site Audit tool. 

Step 1: Once your project has been created, launch the Site Audit tool from your project dashboard: 

Use the panel to configure the tool’s crawl scope and website access. 

Once the audit is complete, click on the issues tab:

Filter through the issues for any link errors. If you’re unsure what the errors mean, the tool includes an explanation and suggestions on how to resolve the issue (“Why and how to fix it”). 

Find and fix broken links

with the Site Audit tool

Final Thoughts 

Good hyperlinking makes it easier to navigate and crawl your website. No matter your linking structure, it’s important to spot and update broken links as soon as possible. 

Use the Site Audit tool to discover any broken or bad links and to stay on top of any potential technical errors. 

What do you think?

WebCEOSEO Tools

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading…

0
WebCEOSEO Tools
5-critical-errors-a-site-crawler-can-reveal-for-your-site

5 Critical Errors A Site Crawler Can Reveal For Your Site

what’s-the-difference-between-performance-and-brand-marketing?

What’s the Difference Between Performance and Brand Marketing?