The <link>
tag is used to define a relationship between the current HTML document and an external resource. It is most commonly used to link external CSS stylesheets to a webpage. This tag must be placed within the <head>
section.
The <link>
tag helps in attaching resources like stylesheets, icons, and preconnect hints to a webpage. It plays a crucial role in improving the styling and performance of websites.
<link rel="stylesheet" href="style.css">
1. Linking a CSS file:
<link rel="stylesheet" href="styles.css">
2. Adding a favicon:
<link rel="icon" href="favicon.ico" type="image/x-icon">
The <link>
tag is a fundamental part of modern web development, allowing developers to apply styles, icons, and more by referencing external resources cleanly and efficiently.
Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!