A link element is an HTML element that declares a relationship between a page and an external resource. Common uses here connect an HTML page to a CSS stylesheet or to web fonts. section 6.2.3 section 6.3.1
A link element can specify:
- The external file or resource with the href attribute. section 6.3.1
- The relationship with the rel attribute, such as stylesheet. section 6.2.3
- A stylesheet file that should be saved alongside index.html when the href names styles.css. section 6.2.3
Connecting a page to CSS
Place this line in the HTML head: <link rel="stylesheet" href="styles.css">. The browser then looks for styles.css and uses it to format the page. Save styles.css in the same folder as index.html unless the href specifies another location. section 6.2.3 section 6.3.1
<link rel="stylesheet" type="text/css" href="styles.css">
Use the copyable stylesheet link as a compact reference for the element’s attributes and file connection. section 6.2.3


