<link> defines the relationship between two linked documents and is defined in the head section of an HTML document.
Commonly used to link external css files, link favicons (favicon.ico)
(1) Linking external style sheets
- <link href="img/divcss5.css" rel="stylesheet" type="text/css" />
① href value is the external resource address, here is the address of css
②rel defines the relationship between the current document and the linked document, here is the external css style sheet or stylesheet
③type specifies the MIME class of the linked document, where the value is text/css
(2) Use link to refer to the web page favicon
- <link rel="icon" href="favicon.ico" type="image/x-icon" />
①href value is the external resource address here is the address of the favorite icon
②rel defines the relationship between the current document and the linked document, here is the external icon icon attribute
③type specifies the MIME class of the linked document, where the value is image/x-icon
[Special Instructions]: The <link> tag does not necessarily have to be placed in the <head></head> tag, it can be appropriately placed in the part above <body> and </body>, the effect is the same, but it is recommended to place it in the head tag. Inside.