Analyze the role of rel="nofollow" in HTML and the use of rel attribute

Analyze the role of rel="nofollow" in HTML and the use of rel attribute

Adding the rel="nofollow" attribute to a link tells the search engine not to track this connection and thus not to pass on authority. Careful webmasters may find that many blogs have this attribute added to their friendly links. The purpose of doing so is to avoid diluting the authority of their own websites. The rel attribute means: the relationship between the current page and the page it points to. The rev attribute specifies the relationship from the target document to the source document. Baidu currently supports the rel='noflow' attribute. Proper use of this tag will greatly improve the website.

Webmasters may know that if a link is added with the attribute rel="nofollow", it means telling the search engine not to follow this link and thus not pass on the weight. Careful webmasters may find that many blogs have added this attribute to their friendly links, in order to avoid diluting the weight of their own website.

What does the rel attribute mean?

The rel attribute means: the relationship between the current page and the page being pointed to.

The optional attributes rel and rev of the <a> tag indicate the formal relationship and direction between the source and target documents, respectively. The rel attribute specifies the relationship from the source document to the target document, while the rev attribute specifies the relationship from the target document to the source document. Both attributes can be used together in the <a> tag.

XML/HTML CodeCopy content to clipboard
  1. <   href = "xxx.php?page=2"   rel = "next"   rev = "prev" > < >   

Multiple values ​​of the rel or rev attribute are separated by spaces.

Usage of the rel attribute

Usually this attribute is used in: link tag/a tag/meta tag, writing example:

XML/HTML CodeCopy content to clipboard
  1. <   href = 'https://www.jb51.net'   rel = 'friend' > 123WORDPRESS.COM </ a >   

This rel attribute is actually designed specifically for search engines. It is known that Baidu currently supports the rel="nofollow" attribute. Proper use of this tag will greatly improve the website.

The value of the rel attribute

value describe
alternate Alternative versions of a document (such as a printed page, a translated page, or a mirror image).
stylesheet The document's external style sheet.
start The first document in the collection.
next The next document in the collection.
prev The previous document in the collection.
contents Document directory.
index Document index.
glossary A glossary or explanation of the words used in the document.
copyright Document containing copyright information.
Chapter Chapter of the document.
section The section of the document.
subsection A subsection of the document.
appendix Document appendix.
help Help documentation.
bookmark Related documents.
nofollow Google uses "nofollow" to instruct the Google search engine not to follow the link.
licence
tag
friend

Knowing the above rel="" attributes, when we design web pages, we only need to set the link tags according to the corresponding attributes, which will be of great help to our website optimization.

The above rel attribute is for HTML format. In the era of social networking, Weibo/WeChat are rampant. Compared with HTML, the rel attribute of the a tag has the XFN specification, so I will not elaborate on it here.

<<:  In-depth study of JavaScript array deduplication problem

>>:  Mysql sql slow query monitoring script code example

Recommend

Use JavaScript to create page effects

11. Use JavaScript to create page effects 11.1 DO...

HTML table layout example explanation

The elements in an HTML document are arranged one...

How to deploy SpringBoot project using Dockerfile

1. Create a SpringBooot project and package it in...

Vue integrates Tencent TIM instant messaging

This article mainly introduces how to integrate T...

11 Linux KDE applications you didn't know about

KDE Abbreviation for Kool Desktop Environment. A ...

Full analysis of MySQL INT type

Preface: Integer is one of the most commonly used...

MySQL server 5.7.20 installation and configuration method graphic tutorial

This article records the installation and configu...

Detailed explanation of built-in methods of javascript array

Table of contents 1. Array.at() 2. Array.copyWith...

JavaScript jigsaw puzzle game

This article example shares the specific code of ...

Pycharm2017 realizes the connection between python3.6 and mysql

This article shares with you how to connect pytho...

CSS3 clear float method example

1. Purpose Through this article, everyone can und...

Detailed tutorial on running selenium+chromedriver on the server

1. Introduction I want to use selenium to scrape ...

MySQL learning notes: data engine

View the engines supported by the current databas...

Solution for multiple Docker containers not having the same port number

Background In Docker, four containers are created...

Using Docker+jenkins+python3 environment to build a super detailed tutorial

Preface: After the automation is written, it need...