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 Debugging HTML and CSS Problems How to Fix Problems with Code

I need help over here!

is there anything wrong with this code?

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

When i want to preview it in the page this what happens,let me explain it for you. when i want to preview it it shows me a file tree of all my webpage files then i must go to the html file to access.

I cannot regenerate your error. You have pointed it to a video. Could you please, elaborate a little more.

And as for your code, it seems fine. Also, just try and check the path and directory-name. (href:"css/main.css")

2 Answers

My best assumption is that you have another file cascading this file. Or maybe you placed it in the wrong place in your html; are you sure it's in the <head></head>


Anthony Bennett
Anthony Bennett
4,858 Points

Try it without the subfolder in some cases this works: <link rel="stylesheet" type="text/css" href="main.css" />