The <link> tag in HTML is used to link external resources to the HTML document. Its functions include: referencing style sheets, setting page icons, introducing external scripts, preloading resources and defining alternative icons.
The role of the link tag in HTML
The <link>
tag in HTML Used to link external resources, such as style sheets, icons, and external scripts, to HTML documents. It provides the browser with information about external files referenced in the document.
Function:
href# of the tag ## Attributes can reference external CSS files to define the style of the document.
##
<code class="html"><link rel="stylesheet" href="style.css"></code>
<code class="html"><link rel="icon" href="favicon.ico"></code>
<code class="html"><link rel="stylesheet" href="script.js"></code>
The above is the detailed content of The role of the link tag in html. For more information, please follow other related articles on the PHP Chinese website!