This article mainly introduces the rel Attribute Analysis in HTML. For more information, see
I found that some of my colleagues broadcasted this article on Weibo and added it to my favorites. So I will review this article on casual translation. Later I found that w3cschools.com.cn already has a Chinese translation, so here I will continue to improve this article to make it more valuable. I first thought of translating this document from idea.
Example
Connections with rel attributes:
ooxx
Browser support
Rel attributes are supported in all mainstream browsers
Note:This attribute is ignored during browser rendering, but the search engine can obtain more information from it (the tag is only valid when the href attribute exists ).
Definition and use
The rel attribute specifies the relationship between the current document and the connected document.
Syntax
Differences between HTML 4.01 and HTML 5
Deleted Values: appendix, chapter, contents, copyright, glossary,Index, Section, start, subsection.
New Values: archives, author, bookmark, external, first,Index, Last, license, nofollow, noreferrer, search, sidebar, tag, up.
Attribute Value
Value |
Description |
Scenario | example |
HTML4.01 |
HTML5 |
Appendix |
Link to the document Appendix |
|
|
|
Alternate |
Link to an alternative source (for example, print pages, translations, and images) |
Configure the atom and feed of the website in the head label. |
|
|
Shortcut icon |
Small shortcut icon |
Specify the title bar, address bar, and favorites bar icons |
|
|
Archives |
Link to the document set or historical data |
|
|
|
Author |
Author of the link |
Author of the declarative document in the head label |
|
|
Canonical |
Authoritative, exemplary |
Let the search engine know which page the webmaster wants to capture and include in the duplicate or similar web pages of the current website
- The canonical attribute value usually appears in the rel attribute.
- URL: http://www.xxoo.com/xhtml/rel_canonical/
- Canonical can be considered as a secondary feature of 301 permanent redirection.
- Canonical can be used with relative or absolute links, but absolute links are recommended.
- Google defines canonical as the first choice for a set of highly similar webpages.
- Canonical: Meaning of Chinese "model"
|
|
|
Stylesheet |
Document external style sheets |
|
|
|
Home |
Home Page |
|
|
|
First |
Link to the first document in the Set |
|
|
|
Start |
Link to the first page of the current document |
|
|
|
Next |
Link to the next document in the Set |
|
|
|
Prev |
Link to the previous document in the Set |
|
|
|
Last |
Link to the final document in the collection |
|
|
|
Up |
Provides a link to a document. This document provides the context of the current document |
|
|
|
Search |
Search Tools linked to documents |
|
|
|
Sidebar |
Link to the document that should be displayed in the browser sidebar |
|
|
|
Contents |
Link to the content directory of the current document |
It is usually placed on the main content bar of the document to facilitate jump between topics on the current page |
|
|
Index |
Index linked to the current document |
|
|
|
Glossary |
Link to the glossary of the current document |
|
|
|
Copyright |
Link to the copyright or privacy page of the current document |
Website bottom Copyright |
|
|
Chapter |
Link from the current document to a chapter |
|
|
|
Section |
Link to a section in the document list |
|
|
|
Subsection |
Link to the sub-section in the current document list. (A section can have multiple sub-sections .) |
|
|
|
Head |
Link to the top-level document in the Set |
|
|
|
Toc |
Directory linked to the set |
|
|
|
Parent |
Link to the source document |
|
|
|
Child |
Link to the document below the source |
|
|
|
Help |
Link to help document |
|
|
|
Bookmark |
Used as a permanent URL for bookmarks |
List title |
|
|
External |
Link to external document |
External Connection referenced in the article |
|
|
Nofollow |
Link to unauthorized documents, such as paid links Google uses "nofollow" to ensure that its search Spider does not track the link |
Related Articles on the site, random articles on the site, comments and replies, comments, views, and author links on the list and article pages, comment addresses on the sidebar, and the "Homepage" link in the homepage navigation bar, most comments and most visits |
|
|
Noreferrer |
Requires that the browser should not send an HTTP referer header when the user follows the hyperlink |
|
|
|
License |
Copyright information linked to the document |
|
|
|
Tag |
Current document tag (keyword) |
Tag Cloud in the sidebar, tag in the article, tag in the list, and tag in the tab |
|
|
Friend |
Sponsorship |
Link, themes by at the bottom |
|
|
Due to my limited level, it is inevitable that there will be some errors. If you find anything inappropriate or need to be supplemented, please leave a message and point out, thank you!
Reference
Http://www.w3schools.com/TAGS/att_a_rel.asp
Http://vanessa.b3log.org/research-a-rel-value
Http://www.w3school.com.cn/htmldom/prop_anchor_rel.asp
I have to mention the rel-author label.
HTML rel canonical Attribute Value
Description of link label rel attributes
Rel = "canonical" (google webmaster tool)