In HTML, anchor text is whatever sits between the opening and closing tags of a link, the <a> element. In this link, the anchor text is "ghost peppers":
<a href="https://example.com/ghost-peppers">ghost peppers</a>
The URL in href says where the link goes. The anchor text tells people, before they click, what they'll find there. When the link is an image, the image's alt attribute plays the same role.
Why anchor text matters
Readers use anchor text to decide whether a link is worth their time. People using a screen reader can pull up a list of every link on a page and hear them out of context, so "click here" five times tells them nothing. Accessibility guidelines (WCAG 2.4.4, Level A) ask that a link's purpose be clear from its text, or from its text plus the surrounding sentence. W3C
Search engines read anchor text too. Google uses it to understand what the linked page is about, both for links between your own pages and for links from other sites to yours. Google Search Central
How to write good anchor text
Google asks for anchor text that is descriptive, reasonably concise and relevant to both the page it's on and the page it points to. A quick test: read the anchor on its own. If it doesn't say where the link goes, rewrite it.
| Instead of | Write |
|---|---|
| To see our sizing chart, click here. | Check our [sizing chart] before you order. |
| Read more | [How to choose trail running shoes] |
| We wrote [a long guide to every kind of running shoe for beginners and experts]. | We wrote a [running shoe guide] for every level. |
| A link with no text at all | Words that name the destination |
(The brackets mark the anchor text in these examples.)
A few habits help:
- Name the destination in the reader's words. "Return policy" beats "this page".
- Keep it short. A word or a short phrase usually does it; a whole sentence buries the point.
- Let the sentence carry context. Google also looks at the words around a link, so the anchor doesn't have to say everything.
- Space links out. Several links in a row are hard to tell apart, for people and for search engines.
- Give linked images real alt text, such as "add enchiladas to your cart". An empty
alt=""leaves the link without a label.
Write naturally. Cramming keywords into anchors is keyword stuffing, which breaks Google's spam policies.
Common types of anchor text
SEOs sort anchors into a few types. These labels come from the industry, not from Google, but they help when you review the links pointing to a page:
| Type | Example, for a link to a running shoe guide |
|---|---|
| Exact match | running shoe guide |
| Partial match | our guide to picking running shoes |
| Branded | TrailCo |
| Naked URL | trailco.example/guide |
| Generic | read more |
| Image | the linked image's alt text |
Google publishes no target mix. On your own site, descriptive anchors, including the words people search for, are exactly what Google recommends. The trouble starts when anchors are engineered rather than written.
When anchor text becomes link spam
Google's spam policies list link patterns it treats as manipulation, and several involve anchor text: Google Search Central
- Links with optimized anchor text in articles, guest posts or press releases distributed on other sites.
- Keyword-rich, hidden or low-quality links embedded in widgets that spread across many sites.
- Forum comments with optimized links in the post or signature, such as "best pizza san diego".
If you build backlinks, let the linking site describe you in its own words. A hundred links that all say "cheap running shoes" look arranged, and usually are. See link schemes for the wider rules.
Make sure search engines can follow the link
Anchor text only counts if the link is a real link. Google can reliably follow an <a> element with an href attribute. Links built from <span> elements, onclick handlers or framework attributes without an href may never be followed, so their anchor text is lost.
If a link has no text, Google may fall back to its title attribute, but treat that as a fallback, not a substitute for visible words. For pages that add links with JavaScript, check the rendered HTML with URL Inspection to confirm the anchor text is there.
For your own internal links, the same rules apply: link every page you care about from at least one other page, and give each link anchor text that names what's on the other side.