Links do more than move people between pages. The HTML rel attribute describes the relationship between your page and another resource. The value alternate means: points to another version of the current resource.
What alternate means
Points to another version of the current resource.
Write it as rel="alternate" on an appropriate <a> or <link> element. Not every relationship is defined for both: the correct element depends on the link type.
Example markup
<!-- Relationship: alternate -->
<link rel="alternate" hreflang="fr" href="https://example.test/fr/lesson">
What the browser does
This example uses <link>, which normally belongs in the document head and describes a resource relationship without adding a visible clickable link.
Useful for translated pages or alternate feeds; the other version should really exist.
This relationship value does not automatically restyle the link, change its accessible name or make a new page secure. Navigation and user-facing labels still need deliberate HTML.
When to choose this token
Use alternate only when the relationship is genuinely true for that destination. If it describes a web resource, make sure that resource exists and serves the right content. For an external URL, do not confuse a relationship hint with permission, security or a redirect.
Small practice task
Create a simple test page with the example. Inspect the resulting element in Developer Tools. Change the target to another sensible file or URL, then explain whether the visible page, a network request, or only the relationship metadata changed.
Common Beginner Mistakes
- Useful for translated pages or alternate feeds; the other version should really exist.
- Assuming
rel="alternate"has the same effect on every kind of HTML link. - Adding a relationship token when the destination does not have that relationship.
Key Takeaways
alternatemeans points to another version of the current resource.- Useful for translated pages or alternate feeds; the other version should really exist.
- Choose a valid link element and test what the browser actually does.