How to Connect your HTML file to a CSS file

2/24/2022

To connect your HTML file to CSS, include the following code in your HTML's section. Remember, the section contains the attributes and general settings of the HTML page.

<head> <link rel="stylesheet" href="nameOfYourCssFile.css"> </head>

In the example above, the html and css file live in the same folder, so I don't have to specify the CSS's files location, for example: /css/styles.css.