Technical SEO

Backlinks in HTML: How a Link Is Built and What Each Part Does

By BacklinkPrice Team · Nov 27, 2026 · 9 min read
Cover for Backlinks in HTML: an anchor tag code snippet on a dark background

A backlink in HTML is an anchor tag: an href that sets the destination, anchor text that describes it, and a rel value that tells Google about the relationship.

Quick answer: In backlinks HTML, a link is an anchor tag with three parts: an href that sets the destination page, anchor text that describes it, and a rel value that tells Google about the relationship. Most links pass ranking credit, but a link with rel="nofollow" or rel="sponsored" tells Google not to pass it, which is the correct tag for paid and sponsored links.

TL;DR: Read the anchor tag, not just the link. The href, the anchor text, and the rel value together decide what a backlink does.

Key takeaways

  • A backlink is an anchor tag: <a href="https://example.com"> plus anchor text plus a closing tag.
  • The href sets the destination, and a broken or redirected href wastes the link.
  • Anchor text should describe the target page in plain words, not repeat the same exact phrase everywhere.
  • A link insertion is a link added to an existing page, and its HTML is the same anchor tag as any other link.
  • Use rel="nofollow" for links you cannot vouch for, rel="sponsored" for paid links, and rel="ugc" for user content.
  • Google treats nofollow, sponsored, and ugc as hints, not orders, since March 1, 2020.

The anchor tag, piece by piece

Every backlink on the web is an anchor tag. It looks like this:

<a href="https://example.com/guide">useful guide</a>

The <a> opens the tag. The href holds the destination address. The words between the tags are the anchor text, and </a> closes it. A browser shows the anchor text as a clickable link, and a search engine reads the same tag to learn that one page points to another.

The href is the most important part, because it decides where the link goes. A href that points to a deleted page sends visitors to an error. A href that points to a page that redirects twice still works, but it passes less value than a direct link. Always check the destination page before you pay for a link or publish one.

The anchor text is the second part. It tells readers and search engines what the linked page is about. "Useful guide" is fine. "Click here" says nothing.

A page that links to a pricing guide with the words "backlink prices" gives Google a clear signal about the target page.

The rel attribute: nofollow, sponsored, and ugc

The rel attribute describes the relationship between the linking page and the target. It is the part of the tag that most link buyers get wrong, and it decides whether a link passes ranking credit.

<a href="https://example.com" rel="nofollow">partner site</a>

Google introduced nofollow on January 18, 2005, so that publishers could link to pages they did not trust or vouch for. On September 10, 2019, Google added two more values: rel="sponsored" for paid and sponsored links, and rel="ugc" for links in user-generated content such as comments and forum posts.

Google Search Central states the rule plainly: paid links are not a violation when they carry rel="nofollow" or rel="sponsored". A paid link without one of those tags is link spam under Google's policies, and a site that breaks the policy may rank lower or not appear at all, according to the same Google page.

Since March 1, 2020, Google treats all three values as hints rather than orders. That means Google may choose to follow a nofollow link for crawling or ranking, but a publisher should still tag paid links correctly. The tag is a statement of intent, and Google expects publishers to make it honestly.

What anchor text does, and what it does not do

Anchor text matters, but less than most guides claim. Ahrefs' anchor-text study of 384,614 pages found only a weak correlation of about 0.14 between anchor text and rankings, and Ahrefs advises against trying to manipulate anchor ratios. The pattern of anchors matters more than any single phrase.

A natural profile has a mix: brand names, plain URLs, generic words such as "here" or "this guide", and a few descriptive phrases. A profile where every link uses the same exact-match phrase, such as "buy cheap backlinks", looks bought, because real editors do not all write the same words.

Domain Rating does not come from the anchor tag at all. It is Ahrefs' 0 to 100 score for the strength of a site's whole backlink profile, calculated from all the links a site has earned. One link with perfect anchor text cannot lift it on its own.

Part of the tagWhat it doesCommon mistakeWhat to do instead
hrefSets the destination pagePoints to a deleted pageCheck the page loads with a 200 status
Anchor textDescribes the targetSame exact phrase on every linkVary the wording naturally
rel="nofollow"Says you cannot vouch for the linkUsed on every outbound linkUse it for paid and untrusted links
rel="sponsored"Marks a paid linkLeft off a paid placementAdd it to every paid link
rel="ugc"Marks user contentLeft off comment linksAdd it to comments and forums

Google introduced nofollow on January 18, 2005, added sponsored and ugc on September 10, 2019, and has treated all three as hints since March 1, 2020. Paid links are not a violation when tagged with nofollow or sponsored. Source: Google Search Central, 2026.

You can read any backlink in a browser without tools. Right-click the link and choose Inspect, or view the page source and search for the href. What you see tells you whether the link is worth anything.

First, check the href. It should point to the page you expect, with no redirect chain and no tracking parameter that changes the destination. A link that goes through three redirects still counts, but it is weaker than a direct one.

Second, check the rel value. A link with rel="sponsored" is a paid link, and Google will not pass it ranking credit. A link with rel="nofollow" is the same.

Neither is useless: both can send real visitors, and both can help a page get found. But neither should be priced like a link that passes credit.

Third, check the anchor text and the text around the link. A link inside a real paragraph, next to words about the topic, is worth more than a link in a footer or a sidebar. Google's spam policies name large-scale article campaigns and footer links as patterns to watch, because those links are rarely editorial.

Backlink checkers do this reading at scale. They crawl the web, record the anchor tag for each link, and show the href, the anchor text, and the rel value for every link to a domain. That is how a buyer checks a link before paying for it.

The most common mistake is a link that points nowhere. Pages get deleted, sites get redesigned, and links break. Ahrefs' link rot study found that 66.5% of links to pages from 2013 were dead by the time of the study, so a link profile left alone loses value every year. Check your links monthly and ask for a fix when one breaks.

The second mistake is a link wrapped in the wrong tag. A link built with JavaScript instead of an anchor tag may not be seen by search engines at all. A link inside an image with no anchor text gives Google nothing to read. If a link matters, it should be a plain anchor tag with real words.

The third mistake is a rel value that does not match the deal. A paid link without rel="sponsored" breaks Google's rules. A free editorial link tagged nofollow for no reason passes less value than it should. Tag each link for what it really is.

The fourth mistake is a link to the wrong page. A guest post that links to a homepage when the article is about pricing wastes the chance to point readers at the pricing page. Match the href to the subject of the sentence that holds it.

Frequently Asked Questions

A backlink in HTML is an anchor tag: <a href="https://example.com">anchor text</a>. The href sets the destination, the anchor text describes it, and an optional rel value tells Google about the relationship between the two pages.

What does rel="nofollow" do?

It tells Google that the publisher does not vouch for the linked page. Google has treated nofollow as a hint, not an order, since March 1, 2020, but the tag still marks the link as one that should not pass ranking credit by default.

When should I use rel="sponsored"?

Use it on any link that was paid for, including sponsored posts, paid placements, and links given in exchange for goods or services. Google Search Central says paid links are not a violation when they carry rel="nofollow" or rel="sponsored".

Does anchor text still matter for SEO?

It matters a little. Ahrefs' study of 384,614 pages found only a weak correlation of about 0.14 between anchor text and rankings. Natural, varied anchor text is the safe pattern, and repeating the same exact phrase on every link is a sign of a bought profile.

Yes. Right-click any link in a browser and choose Inspect to see its anchor tag, href, anchor text, and rel value. Backlink checkers do the same job for a whole domain at once.

No. A nofollow link can still send visitors, help a page get discovered, and build brand awareness. It does not pass ranking credit by default, so it should cost less than a link that does, but it is not worthless.

Expert verdict

Best for: anyone who buys, sells, or audits links and wants to read the tag before trusting the link.

Not for: readers who only care about the count of links, because the HTML shows that not all links are equal.

Pros: the anchor tag is easy to read; the rel values are clear; a quick inspection catches most bad links.

Cons: reading tags by hand does not scale, and a link that looks fine in HTML can still sit on a page with no traffic.

The link insertion page explains how a link added to an existing page works, and why its HTML is the same anchor tag as any other link.

Check the pricing guide before you pay for a link, because a link that passes credit costs more than one tagged nofollow or sponsored.

The link insertion page explains how a link added to an existing page works, and why its HTML is the same anchor tag as any other link.

Check the pricing guide before you pay for a link, because a link that passes credit costs more than one tagged nofollow or sponsored.

Bottom line

Read the anchor tag. Check the href, the anchor text, and the rel value before you pay for a link or count one as an asset. A link that passes credit, points to a live page, and sits in real content is worth paying for. One that fails any of those three tests is not.

Sources

BacklinkPrice Team
Written by
BacklinkPrice Team
Link building and backlink pricing research

The BacklinkPrice Team researches backlink prices, publisher sites and link building tools. We check prices and plans against each provider's own pages and date them, so you know how current the numbers are.

More from BacklinkPrice Team

Related guides