Link CSS to html

Question:

Repl link:

How to link html and Css

In order to connect styles from a .css file to an html page, you must add this code inside the head tag in a .html file:

<link rel="stylesheet" href="path/to/file.css">

In the href parameter, you must add the relative path to the .css file.

5 Likes