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
Aleksandra Agosto
2,125 PointsHow to link css file to html file?
I'm using Komodo Edit 8.5 (free) and this is my first time trying to make a page from scratch and I'm so frustrated by the fact that I can't get my stylesheet to link!
Could someone check my code to see if anything's wrong? http://codepen.io/anon/pen/EblmK
and yes, I've checked a million times to make sure my css file is called "main". No typos, no capitalization. Just clearing that up now since I'm sure that's the first question I'll be asked haha.
1 Answer
John Steer-Fowler
Courses Plus Student 11,734 PointsYour code that looks like this:
<link rel="stylesheet" href="C:\Users\Aleksandra\Desktop\NJAA\css\main.css">
It should just be something like this:
<link rel="stylesheet" type="text/css" href="css/main.css">
Aleksandra Agosto
2,125 PointsAleksandra Agosto
2,125 PointsNo, that didn't work :/
Aleksandra Agosto
2,125 PointsAleksandra Agosto
2,125 PointsNo idea why, but it randomly started working without me doing anything! haha thanks anyways!
John Steer-Fowler
Courses Plus Student 11,734 PointsJohn Steer-Fowler
Courses Plus Student 11,734 PointsNo problem :D