HTML - The link element (inter-document relationships)

About

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

It's not an hyperlink

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

Type

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" >

canonical

A canonical value should be the unique identifier of a document for this entire life. See HTML - Canonical URL

<link rel="canonical" href="https://gerardnico.com/cat/post1" />

Documentation / Reference


Powered by ComboStrap