Linking to an external stylesheet

Abstract photo of bright, colorful dots.
Photo by Thomas Evans.

The link for your external stylesheet must appear in the <head> element of your HTML document. The link element should look like this:

<link href="css/style.css" rel="stylesheet">

Note: The href value (“css/style.css”) could be different depending on your file path structure and where your style.css file is saved. Need a refresher on file paths? Check out this previous lesson on file paths. It could also be different if you CSS file is named something other than style.css. In other words, make sure that you update this value to reflect the actual file name and location of your CSS file!