Home>Article>Web Front-end> Detailed explanation of the rel attribute of thetag
The
2cdf5bf648cf2f33323966d7f58a7f3f tag defines the relationship between the current document and other documents in the Web collection. The link element is an empty element that contains onlyattributes. This element can only exist in theheadsection, but it can appear any number of times. In HTML, the 2cdf5bf648cf2f33323966d7f58a7f3f tag does not have a closing tag. In XHTML, the 2cdf5bf648cf2f33323966d7f58a7f3f tag must be closed properly.
In addition to the standard general attributes of HTML, the link element also includes many optional attributes: charset, href, hreflang, media, rel, rev, target, title and type. Among these attributes, target is only allowed to be used in two DTDs: Transitional and Frameset.Otherscan be used in three DTDs: Strict, Transitional and Frameset.
Among these attributes, the rel attribute is the core. Search engines can use this attribute to obtain more information about the link.(1)
stylesheet-- Calling an external style sheetThis attribute is the most commonly used and is used to call a style sheet, as shown below:
Where href is the URL of the target document, type specifies the MIME type of the target URL, and media specifies the device on which the document will be displayed
media: ["screen": indicates the display device ; "
": indicates the printing device;].
(2)
icon-- Define the website favorite icon
icon attribute specifies the title bar, address bar, and collection bar small icons
Note: 1. IE only supports favicon in ico format; 2. The rel attribute must contain shortcut to be displayed under IE;
##(3)
-- Specifies the canonical version of the URL
The canonical attribute is used to let the searchengine know which of the duplicate or similar web pages in the current website is the page that the webmaster wants it to be. Captured and included.
##(4)author
(5)home
(6)search-- Search tool that links to the document
(7)sidebar-- Links to the document that should be displayed in the browser sidebar
(8 )friend-- Friendly link
##Reference link:
http://www.w3school.com.cn/jsref/prop_anchor_rel.asp
The above is the detailed content of Detailed explanation of the rel attribute of thetag. For more information, please follow other related articles on the PHP Chinese website!