HTML - The link element (inter-document relationships)

> (World Wide) Web - (W3|WWW) > HyperText markup Language (HTML)

1 - About

The link element represents metadata that expresses inter-document relationships.

It's not an hyperlink

Advertising

3 - Syntax

The link element can be used only within the head element.

<head>
<link 
    rel="stylesheet" 
    media="screen,projection" 
    href="css/common.min.css" 
    integrity="sha384-ZYfZnVukOuh/gRpU9uN+T9XwwRFJ9Y+0Ylk3zKvI184omb/HoOtQ0F8Iol7Nix7q">
....
</head>

where:

You can also add a css file through the CSS Import rule

4 - Type

4.1 - stylesheet

style sheet

link stylesheet

  • Sync version:
<link href="style.css" rel="stylesheet">
<!-- In the header -->
<link href="style.css" rel="preload" as="style">
 
<!-- Where you want to use the stylesheet (it can be at the bottom of the body) -->
<link href="style.css" rel="stylesheet" >
Advertising

5 - Documentation / Reference