Home > Article > Web Front-end > How to use link in html
In HTML, the element creates a link that connects an external resource (such as a CSS file or icon) to the HTML document. Its usage includes: connecting CSS files, loading style sheets to beautify documents. Associated icons, displayed in browser tabs and favorites. Load other external resources, such as JavaScript files or XML data.
##Usage of link in HTML
In HTML, the element Used to create links that connect external resources (such as CSS files or icons) to HTML documents.
Usage syntax:
##
elements are usually placed within the <head>
element, Because external resources need to be loaded before the document is loaded.
##
The element is mainly used for the following purposes:Connect CSS file:
<code class="html"><link rel="stylesheet" href="style.css" /></code>Associate favicon:
<code class="html"><link rel="icon" href="favicon.ico" /></code>
Note:
Make sure the URL of the external resource is correct, otherwise the link may fail.
The above is the detailed content of How to use link in html. For more information, please follow other related articles on the PHP Chinese website!