Internet
Fact-checked

At WiseGEEK, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What is a Rel Attribute?

Mary McMahon
Mary McMahon
Mary McMahon
Mary McMahon

The rel attribute is an HTML attribute used to describe the relationship of a target page to the page that is linking it. Information is not displayed directly in the browser, but search engines and screen readers can both pick up the rel attribute and gather information about the network of connections on a page. The reverse is the rev attribute, used to contextualize the current page in relationship to what is being linked.

This attribute is written as rel="property" and would appear in a link like this: < a rel="home" href="http://www.wisegeek.com">wiseGEEK</a>. The rel attribute notes that the resource being linked is the home page, relative to the document where the link originates, such as this wiseGEEK article. Likewise, a site with affiliate partnerships might use a code like this: < a rel="affiliate" href="http://www.example.com">Friendly Affiliate</a>. When search engines crawl the site, they can understand the relationships between pages within a site, as well as off-site links.

The rel attribute is an HTML attribute used to describe the relationship of a target page to the page that is linking it.
The rel attribute is an HTML attribute used to describe the relationship of a target page to the page that is linking it.

Another common example of how this attribute can be used is in navigation, to prevent confusions and turnarounds. < a rel="next" href="http://www.example.com/2">Further Entries</a> might be used on a blog to provide a link to another page of entries. People can also use descriptors like “previous,” “stylesheet,” and “index” to provide descriptive tags for resources. The rel attribute can also be tied in with other code; for instance, a style sheet can be coded to display a small arrow next to a link with a rel="previous" for ease of navigation.

Like many HTML attributes, the rel attribute is not consistently applied. Some sites may use it extensively, and it can be very helpful for tools like building site maps. Other sites do not use it at all, and sometimes, odd uses of the attribute crop up and may confuse browsers. As HTML standards change, attributes go in and out of style, and it is important to make sure websites are updated accordingly to avoid problems like display errors.

People curious to know about browser support for various attributes can look up technical documentations on the websites for those browsers. It is important to be aware that even if the most current version of a browser recognizes and knows how to apply an attribute, older versions may not, and people concerned about reaching as many browsers as possible may want to consider this when coding sites. Sometimes, adjustments need to be made to site code for the benefit of people using older browsers in order to get them to display appropriately.

Mary McMahon
Mary McMahon

Ever since she began contributing to the site several years ago, Mary has embraced the exciting challenge of being a WiseGEEK researcher and writer. Mary has a liberal arts degree from Goddard College and spends her free time reading, cooking, and exploring the great outdoors.

Learn more...
Mary McMahon
Mary McMahon

Ever since she began contributing to the site several years ago, Mary has embraced the exciting challenge of being a WiseGEEK researcher and writer. Mary has a liberal arts degree from Goddard College and spends her free time reading, cooking, and exploring the great outdoors.

Learn more...

Discuss this Article

Post your comments
Login:
Forgot password?
Register:
    • The rel attribute is an HTML attribute used to describe the relationship of a target page to the page that is linking it.
      By: Dmitry Strizhakov
      The rel attribute is an HTML attribute used to describe the relationship of a target page to the page that is linking it.