The link tag is used to define a link between a document and an external resource. The link tag is used to link to external style sheets. This element can appear multiple times but it goes only in the head section.
The link element is empty, it contains attributes only.
<link rel="stylesheet" type="text/css" href="styles.css">
|charset||It assigns the character encoding of the linked document|
|crossOrigin||It assigns the CORS settings of the linked document|
|disabled||It assigns whether the linked document is disabled, or not|
|href||It is used to set/return the URL of the linked document|
|hreflang||It assigns the language code of the linked document|
|media||It assigns the media type for the link element|
|rel||It assigns the relationship between the current document and the linked document|
|rev||It assigns the reverse relationship from the linked document to the current document|
|sizes||Returns the sizes attribute’s value of the linked resource|
|type||It is used to set/return the content type of the linked document|
Supported Browsers: The browsers supported by HTML <link> Tag are listed below:
- Google Chrome
- Internet Explorer
- Apple Safari
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Akanksha_Rai