Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML rel="alternate"

A rel="alternate" attribute value specifies that the linked page is an alternative version of the current page.

The alternative can be in terms of device type, language, country, etc.

Example

#

A rel="alternate" on an <a> tag.
This link is to a Microsoft page for US users.

Go to Microsoft US
Go to <a rel="alternate" href="https://www.microsoft.com/en-us" 
         target="_blank">Microsoft US</a>

Using rel="alternate"

The rel attribute defines the relationship between the current page and the linked page or resource.

The rel="alternate" value tells search engines the linked page is an alternate to the current page.

This can be another page version in terms of device type, language, country, and more.


Syntax

<tagname rel="alternate" />

Elements that accept rel="alternate"

These elements accept the alternate value on the rel attribute.

Elements Description
<a> Specifies an anchor link -- see example above
<area> Creates clickable areas inside an image map.
<a> Specifies an anchor link

Browser support

Here is when rel support started for each browser:

Chrome
6.0 Sep 2010
Firefox
4.0 Mar 2011
IE/Edge
12.0 Jul 2015
Opera
11.1 Mar 2011
Safari
5.0 Jun 2010

You may also like


Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides