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
Furquan Ahmad
5,148 PointsStuck on Add "css/normalize.css" to the page as an external stylesheet.
This is my code, i can't get past the question :(
'''html <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells Like Bakin' Cupcake Company</title> </head>
<body> <div id="featured-cupcake"> <h2>Cupcake of the Week</h2> <img src="img/featured-cupcake.jpg"> </div> </body> </html> '''
4 Answers
Callum Smith
13,715 PointsTo add an external stylesheet you would add code similar to:
<link href="css/normalize.css" type="text/css">
That code would be inserted between the <head> and </head> tags.
Dennis Skoko
12,860 PointsI think you also need to add the attribute "rel" with the value of "stylesheet".
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
James Barnett
39,199 PointsHow to add normalize.css:
- Go to normalize.css file from github
- Click the big green
downloadbutton - Save the file to your desktop
- Move the
normalize.cssfile in your sublime text project folder - Create a
linkelement that referencesnormalize.css
This works the same way as an <a> by using the href attribture. Make sure to use the right path for the normalize.css file here as well.
If you are still having issues it's most likely related to file paths, that's one of the most common issues for those new to web design. The key is to put your files in the correct folder relative, to your HTML file. You can read up about absolute vs relative paths
Furquan Ahmad
5,148 PointsThank you for all the help, this was the answer : <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">