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

HTML How to Make a Website CSS: Cascading Style Sheets Take a Mobile-First Approach

CSS not connecting to HTML

My CSS styling is not showing up on my webpage what could I have missed that is preventing it from connecting to my HTML file?

4 Answers

Do you have this line of code in your HTML? (inside the <head> tag)

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

This line of code is telling the HTML to use the CSS file.

the best suggestion is to first create a new Folder inside of a folder(where your index.html file is ) then save your CSS files into it. then via that folder path link your CSS to HTML.

Yes I think I have the right code. This is what my HTML code looks like: <!DOCTYPE html> <html> <head> <meta charset= "utf-8"> <title>Pablo Garcia | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>

Bogdan Cabaj
Bogdan Cabaj
16,348 Points

The only thing I can think of is that your main.css file is still in the main folder instead if in css folder.

Thanks, Bogdan

I was really looking at my code and I realized I misspelled "wrapper" in my HTML. Thanks so much for the help though! It helped me to be able to narrow down what the issue was