What Is an Href Link?
An href link (also called an âa href linkâ) is an HTML attribute within an <a> tag that creates a clickable hyperlink and specifies the linkâs URL.Â
Href links connect webpages, guide users, and help search engines discover content that might be used for search results.Â
Below is an example of an href link that creates the clickable text âSemrush.âÂ

Href values can include:
- Relative URLs (e.g., href="/about"): Relative URLs are partial URLs that are often useful for internal links (links to other pages on your site). Theyâre useful if you ever change your domain name because you wonât need to update your internal links.
- Absolute URLs (e.g., href="https://example.com"): Absolute URLs are full web addresses and are required when linking to external sites
- Anchor links (e.g., href="https://example.com/#section"): Anchor links jump to specific sections on a page that have CSS IDs (unique identifiers added to HTML elements). They help users skip to relevant content. Like links to subheadings shown in a table of contents.
- Mailto links (e.g., href="mailto:info@example.com"): Mailto links open a new email draft in the user's default email client. So they can contact you directly without copying and pasting your email address.
- Tel links (e.g., href="tel:+1234567890"): Tel links dial a phone number on supported devices and are ideal for mobile users who want to initiate a call with a single tap
Content management systems (like WordPress) have tools that eliminate the need to code href links manually.Â
But itâs helpful to know these details in case you want to make manual adjustments.
Common Attribute-Value Combinations for <a> Tags
The <a> tag includes several attributes (instructions that control how a link behaves) and values (the specific settings for those instructions) that together define how a link works for users and search engines.
target=â_blankâ
Using target=â_blankâ opens a link in a new browser tab, which can help keep users on your site for longer (when linking to an external site).
Zachary Rischitelli, Founder and Managing Director at Real FiG Advertising + Marketing, recommends using this attribute for external links and when linking to larger files or documents. So readers donât lose your page if they click away.
The World Wide Web Consortium (an organization that develops guidelines to help people build an accessible web) advises adding warning text beside links that open in new tabs like this. Such as adding â(opens in new tab.)âÂ
That way, users who have difficulty perceiving visual content wonât be surprised when they click your links.
Example:Â
<a href="https://example.com" target="_blank">Visit Example (opens in new tab)</a>rel=ânofollowâ
A rel=ânofollowâ attribute tells search engines not to follow the link or pass any SEO value (link equity) to the linked page.
Dorian Menard, Founder and Director at Search Scope, says,Â
âWe use this with user-generated comment sections or sponsored content to ensure we stay within Google's guidelines.âÂ
Dorian also mentions that ârel=ânofollowâ is good to use when linking to untrusted content where you donât want to endorse the destination. Like if you need to cite a questionable source.Â
Example:Â
<a href="https://example.com" rel="nofollow">Visit Example</a>You can also use rel=âUGCâ and rel=âsponsoredâ for linking to user-generated content like comments or sponsored content. These attributes are more specific and transparent for search engines.
rel=ânoopenerâ
The rel="noopener" attribute-value combination is a security feature that prevents pages opened in new tabs from interacting with the original page and helps protect users from potential security threats.
For example, say you accidentally link to a malicious site from a secure page where a user is logged in. And you donât use rel="noopener."
Zachary clarifies you run some risks by doing so:
âWithout rel=ânoopener,â a malicious site could change your pageâs URL or run a script when the user interacts with it.â
And the original tab may no longer be safe when users return to it.
Because this type of attack only happens when links open in a new tab, rel="noopener" should always be used alongside target="_blank."
Example:Â
<a href="https://example.com" target="_blank" rel="noopener">Visit Example</a>rel=ânoreferrerâ
Use rel="noreferrer" to prevent the destination site from seeing which URL traffic came from to maintain user and site privacy.
For example, say a user is reading an article about a specific anxiety disorder thatâs mentioned in the URL and follows a link in the piece to a therapistâs website. Without rel="noreferrer" added, the external therapist site can see the full URL that referred the visitor.
That URL might not include personal details. But it can still reveal private health concerns, which may pose a potential privacy issue for users.
You might also use rel=ânoreferrerâ if you donât want sites (like a competitor) to know youâve linked to them.
Example:Â
<a href="https://example.com" target="_blank" rel="noreferrer">Visit Example</a>4 Best Practices for Href Links
Follow these best practices for href links to ensure your hyperlinks work properly.
1. Use Correct Syntax
Using the correct syntax ensures your href links work as intended, so search engines and users find the information they need.
Here are the main steps to build an href link using proper syntax:
- Start the a href link with â<aâ
- Add correctly formatted attributes inside the start tag (e.g., href="https://example.com")
- Leave a space before each anchor tag attribute (e.g., <a href=âhttps://example.comâ target="_blank">, not <a href="https://example.com"target="_blank">)
- Close the start tag with > (e.g., <a href="https://example.com">)
- Add your anchor content to form the clickable part of the link (e.g., <a href="https://example.com">Visit our site</a>)
- End the tag with </a>
2. Use Descriptive Anchor Text
Anchor text is the clickable text that helps search engines and users understand what the linked page is about.Â

Instead of using generic text like âclick here,â use descriptive text that helps users (and search engines) understand context about the linked page.
3. Limit the Number of Links on a Page
Including a thoughtful number of links helps people find the resources they need and provides a better user experience.
Whereas excessive links can make a page look spammy and potentially hurt your rankings.Â
Hereâs an example from Google of what unnatural linking looks like:

4. Audit Links Regularly
Regularly checking your href links ensures every path on your site leads somewhere useful.
And catching small errors can help you avoid broken links that lead visitors (and crawlers) to a dead end.Â
Run a quick general check with Semrush's free SEO Checker to spot any obvious issues.
For full link issue detection across your site, use the Semrush Site Audit tool.
After setting it up, find the âInternal Linkingâ report and click âView details.â

Then, look at the âInternal Link Issuesâ to see whether you have:
- Broken links (links that point to a nonexistent destination)
- Too many on-page links (more than 3,000 links on a single page)
- Internal links with nofollow attributes
- Links with missing or non-descriptive anchor text
And many other issues.
Click âLearn moreâ or âWhy and how to fix itâ alongside any issue for more context.Â
Or click the â# issuesâ button to see the affected URLs.

Try Site Audit today.Â
