HTML rel attribute

rel attribute specifies the relation between the page containing the link and the linked resource.

Example

<a href="http://www.codingb.com" target="_blank" rel="next">Next Page</a>|
 <a href="http://www.google.com" target="_blank" rel="prev">Previous Page</a>
Try </>

rel attribute values

The value of this attribute is unique space separated labels.

rel=alternate:

alternate value represents alternate stylesheet for the other media (print, media).

<link href="address of the other stylesheet" rel="alternate">

rel=author:

It links to a page that provides the information about the author.

<a href="author.html" rel="author">Author of the article</a>

rel=help:

help value indicates that the linked page provides contact information to help the user.

<a href="help.html" rel="help">Help</a>

rel=icon:

The link imports favicon that represent the web. The icon can be seen in the tab bar.a and area elements don't have this value.

<link href="favicon.png" rel="icon" >

rel=license:

license value represents that content of the current page has copyright license.

<a href="licence.html" rel="license">Copyright</a>

rel=search:

It provides a link where searches are made to find the topic quickly.

<a href="search.html" rel="search">Search</a>

rel=prev:

previous value links the current document to the previous page.

<a href="next.html" rel="prev">Previous</a>

rel=stylesheet:

It imports the stylesheet of CSS to design the layout of page.

<link href="style.css" rel="stylesheet">

Related Tags

The tags which support this attribute are as follows.

<a> tag

a element defines hyperlink. We can make a link to other websites or other web pages.

<a href="next.html" rel="next">next</a>
<a href="prev.html" rel="prev">previous</a>

It tells the browser that website consists of a series of documents . And these links point to the next and previous pages of the current page.

<area> tag

area element represents a link corresponding to an area on an image. We have to specify the size of an area to make a link.

<area href="URL" shape="poly" title="triangle" rel="nofollow">

link element links the current document to the external resources. These resources may be CSS stytle sheet or script files

<link href="files/style.css" rel="stylesheet">


Was this article helpful?

 

Email:

Message:

Get the newsletter