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
kelsey Harrison
236 Pointslink css to htlm
I have searched throughout the forum and external sources and have not been able to find the answer to what I'm doing wrong. I am trying to link both normalize.css and my main.css.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Kelsey </title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html">
css file looks like this
body {
background-color: orange;
}
Julian Gutierrez
19,325 Points*markdown edited - JG
kelsey Harrison
236 Pointsthank you for editing my markup (this is the first thing I am posting so I wasn't sure how to make it look like that. I see the markdown thing now.
6 Answers
Cheo R
37,150 PointsWhat does your directory structure look like?
kelsey Harrison
236 Pointswebsite folder
css folder
-main.css file
-normalize.css file
img folder
-index.html file
barnetobeka
Courses Plus Student 10,895 Points<link rel="stylesheet" type="text/css" href="css/normalize.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
kelsey Harrison
236 PointsI have tried adding the type and its still not working.
Brodey Newman
10,962 PointsHey Kelsey!
Try formatting your code like mine below:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Kelsey </title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html">Home</a>
</header>
</body>
</html>
You don't have a closing body tag, closing header tag, or a closing HTML tag.
Hope this helps! :)
kelsey Harrison
236 PointsI have a closing header and body tag they are just later in my code I only copied the first section
kelsey Harrison
236 Pointsthank you for your suggestion I feel like its something minor or stupid that I am doing.
'''html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Kelsey Harrison</title> <link rel="stylesheet" type="text/css" href="css/normalize.css"> <link rel="stylesheet" type="text/css" href="css/main.css"> </head> <body> <header> <a href="index.html">Home</a> <h1>Kelsey Harrison</h1> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <secton> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt="image title"> <p>playing with blending methods.</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt="image title"> <p>.</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt="image title"> <p>Experimentation with colour and texture.</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt="image title"> <p>Experimentation with colour and texture.</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt="image title"> <p>Experimentation with colour and texture.</p> </a> </li> </ul> </secton> <footer> </footer> </body> </html> '''
barnetobeka
Courses Plus Student 10,895 Pointsbarnetobeka
Courses Plus Student 10,895 PointsYou should make sure your linking the normalize and the main files correctly
kelsey Harrison
236 Pointskelsey Harrison
236 Pointssorry the spacing didn't stick i have everything on the appropriate lines.