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

Why won't my CSS link to my Html file on treehouse, one of the first lessons?? It clearly works on my sublime editor.

<!doctype html> <html> <head> <title>Sean Hooker's Resume</title> <link rel="stylesheet" href="resume.css"> </head> <body>

h1 { color: blue; font-size: 45px; }

You are missing an = character for your rel attribute.

<link rel="stylesheet" href="resume.css">

Ahhh I did fix that error and it still won't change the font to blue.

Is your css filepath correct? The stylesheet is usually inside a folder called css in the treehouse workspaces.

Steven Parker
Steven Parker
243,656 Points

To facilitate a complete analysis, make a snapshot of your workspace and post the link to it here.

2 Answers

Steven Parker
Steven Parker
243,656 Points

On line 5 of "resume.html", the equal sign is missing after the property name "rel".

That's the same thing Austin said ... but I have to wonder how did he know about that before you posted the snapshot?

Well bc I just copied and pasted the code under the question, but here is the fixed link and its still not linking up https://w.trhou.se/bm2nfd7ink so weird bc I have been doing this on all my other projects, I cant seem to pick it out.

Also, I should have posted my response as an answer not a comment... whoops.

Steven Parker
Steven Parker
243,656 Points

It's still not fixed in this latest screenshot.

When you make the change, do you save using either the key shortcut or the edit menu option?

You have two html files and two css files. In your index.html file, your stylesheet is spelled style.css instead of styles.css, and in your resume.html, you are still missing that = character. I copied your code, fixed those two things and everything worked fine for me. See if that helps.

It wasn't mentioned in the video but I remembered to simply just put the "type" attribute type="text/css" it worked fine.

Steven Parker
Steven Parker
243,656 Points

That property is optional (but a good practice). The main issue was the missing "=" after "ref".