How to Use the Rel Attribute in HTML

How to Use the Rel Attribute in HTML
How to Use the Rel Attribute in HTML

How to Use the Rel Attribute in HTML, An unexplored entryway into the inner workings of web technology is the HTML rel property. Although few people are aware of it, it is an important factor. Ever ponder why certain hyperlinks behave in a particular way while others don’t? The rel property is used in this situation. This useful tool enables you to create specific links between various website components and improves the usability of your website.

In this post, we’ll examine rel characteristics, their function, and some of their most useful applications. So prepare your torches and come along with us as we explore the world of HTML properties.

How to Use the Rel Attribute in HTML
How to Use the Rel Attribute in HTML 2

What is the HTML Rel Attribute?

It’s an HTML tag that specifies how a certain element or link on your site is related to the other parts of your website. It’s like a bridge that is invisible linking one webpage to the other and helps users recognize which links are linked.

If, for instance, you have links to an external site, the rel attribute could signal to the browser that this link should be opened in a new window or even create a popup. The rel attribute can also be utilized to help search engines know the connection to two different pages of your site.

How to Use the Rel Attribute in HTML ?

The rel attribute is usedAttaching the attribute to a hyperlink or other element on your website is all that is required to use it.The syntax rel=”attribute” is frequently used to describe it. Replace “attribute” with the type of connection you want to specify.

For instance, you might specify rel=”noopener not a referrer” to open the link in a brand-new tab.You may use the rel=”related” attribute to indicate the relationship between two websites.

What are the different kinds of Rel Attributes?

There are many different kinds of rel attributes you can apply to identify connections between the elements of your website. Some of the most commonly used ones are:

  • Noopener noreferrer opens the link in a new tab. It blocks websites from accessing information, like your referrer’s URL.
  • Related means that two pages on your site are linked or are part of the same subject.
  • Alternate tells users that they must display another version if there is one available (e.g. printing a version).
  • Canonical – specifies which web page should be considered to be the primary one, if there are several versions online.
  • Help is a reference to the page is containing the required assistance documentation.
  • Appendix: lets users know that the page linked to is an appendix to that page.
  • Contents – indicates that the page has a table of contents.
  • Copyright informs web users that the page includes copyright information.
  • Index – informs browsers the page linked to is an index of the primary page.
  • License – means that the linked page has details about the licensing of the content you have on your site.
  • Shortcut: indicates that the page linked to is a shortcut to primary page.
  • Prefetch: tells browsers to fetch the linked page in order to load it quicker when it is it is accessed.
  • Prev indicates that the page you are linking to is the previous page in the series.
  • Next informs browsers that this page is the next page of the series.
  • Nofollow indicates that the page linked to is not suitable for crawlers of search engines.

Like you’ll see the rel attribute can be utilized in a variety of ways to boost the performance of your site.

When to use the HTML Rel Attribute?

It is an effective device for linking elements of your website. It is a great tool to use in many circumstances. Here are a few of the most popular use scenarios:

  • * Linking to other websites If you add rel=”noopener not-referrer” to a hyperlink and ensuring it opens in a separate tab and secure your referrer URL.
  • Connecting related content If you have several pages that are related to the same subject You can include rel=”related” to signify their relationship.
  • * Indicates the main page. If there are several versions of a page, you may use rel=”canonical” to indicate which of them is the primary page.
  • * By using shortcuts with rel=”shortcut” you can create an automated link that takes you direct to the page.
  • Note: Pointing out copyright details If you would like to display your copyright details and license details, do so using rel=”copyright” or rel=”license”.


Rel attribute may be an excellent tool for organizing your information and helping you create user-friendly webpages.Its numerous applications may be a great way to keep website visitors engaged and make sure that search engines are aware of the connections between the various pages on your website.Do not forget to add it to your webpages and see the impact it makes.

THANK YOU! Read More Blogs On FreeThemePlugins.Com.

Be the first to comment

Leave a Reply

Your email address will not be published.