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 trialPablo Garcia
2,697 PointsCSS 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
Alexander Davison
65,469 PointsDo 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.
MIK 7
Courses Plus Student 881 Pointsthe 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.
Pablo Garcia
2,697 PointsYes 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
16,349 PointsThe 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
Pablo Garcia
2,697 PointsI 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