Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS How to Make a Website CSS: Cascading Style Sheets What is CSS?

index.html not referencing css/normalize file

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Neely | Designer </title> <link rel="stylesheet" href="css/normalize.css"> <style> footer{ color: white; background-color: orange; } </style> </head>

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Neely | Designer </title> <link rel="stylesheet" href="css/normalize.css"> <style> nav a { color: white; background-color: orange; } </style> </head>

your html structure needs to go like this:

<!DOCTYPE html>
<html>
 <head>
   <title>Neely | Designer </title>
   <link rel="stylesheet" href="css/normalize.css">
 </head>
 <body>
 </body>
</html>

3 Answers

there are three ways to add CSS to your html:

externally (best), internally, and inline

internally is by creating a style tag, and inserting your CSS rules within them

<style> footer { color: white; }</style>

inline puts your css rule inside the element you want to style

<footer style="color: white;"></footer>

external is writing your css in a file with a .css extension, then linking to it within the head element

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

so to get to normalize.css you want to add the link element with the href value equal to wherever your normalize file is.

let me know if you have anymore questions.

Florian Goussin
Florian Goussin
8,925 Points

What is inside your link tag ?

I created a folder called css and then i moved the normalize.css file into that folder. I thought i called in correctly in the code but nothing happens when I changed it

Florian Goussin
Florian Goussin
8,925 Points

Is css/normalize.css the href in your link tag ? Is the css folder in the same folder than your html file ?

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

css is in a separate folder and the normalize.css is in that folder

Florian Goussin
Florian Goussin
8,925 Points

You didn't answer my question. :(