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

cannot link css to html

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

Please post your html code so we can look for any errors. This can be done by typing three tildes (the ` key to the left of #1 on the keyboard) before your code to open it and after your code to close it.

Like this

Your code goes here.

5 Answers

Timothy coxon
Timothy coxon
18,633 Points

<link rel="stylesheet" type="text/css" href="css/stylesheet.css" /> Have you added something like this between your <head> tags?

Awesome! Glad that resolved your issue!

I second Timothy Coxon. Add the

type="text/css"

and if that doesn't work, I would check your file path. Make sure all file names match exactly, they are case sensitive.

Timothy coxon
Timothy coxon
18,633 Points

Think you got it actually Joshua.. type is not required but the sensitivity is. Amazing how getting into good habits leaves you at a lose for an answer. I always use type but didn't realise it wasn't actually required.

Yeah Timothy, I see that you're right. I guess it was required in previous versions of html but not in version 5.

<!DOCTYPE HTML>
<HTML>
  <head>
    <meta charset="utf-8">
    <title>Yolanda Cooper | The Bomb</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/main.css"> 
  </head>

Thanks... the file path was CAPS and code was lower case. type="text/css" did not change the link. :)