Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Kevin Calkins
Kevin Calkins
1,047 Points

I am brand spanking new, trying to apply what I've learned so far in the workspace. Need help.

How do I apply my CSS to the html? I made a new file for CSS but its not attached to my html so when i click view workspace it just shows to links to my html which works(i also would rather it just go straight to the html instead of a link to it) but the CSS is just a download which I'm assuming means it doesn't know to attach the style commands to the html. How do I attach it so it styles the html? I'm very new just started two hours ago. I'm assuming I haven't progressed far enough to have learned this yet.

1 Answer

Hi Kevin,

Your code is not pasted here so I'm not sure exactly what you're looking at. Do you have a CSS file already and you want your HTML to recognize the CSS source and style your page?

If that is the case then you can put a link tag on your index.html file inside of the <head> tags. It should look something like this: <link rel="stylesheet" href="css/main.css">. Here, there is a folder called css and the css file name is main.css.

Does this help?

Cheers!

Kevin Calkins
Kevin Calkins
1,047 Points

Yes thank you, that is what i was looking for. I ended up learning this information after finishing the course. Cheers.