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
Wenqian Guo
2,612 Pointslinking css
when we link an external css file to html file like the example in the video < link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">, I noticed that for the type attribute, we use" text/css", not just "css"..why is that? I'm just curious. do we ever use just "css"???..I'm just curious...
4 Answers
John W
21,558 PointsGood question. The link tag can be used to link more than just CSS (though nowadays it is almost exclusively used for CSS), and when we specify the type, we are actually specifying the MIME type, and the MIME type name for text-based CSS just so happens to be text/CSS.
Here is the exact same question asked over at code academy about a year ago:
http://www.codecademy.com/forum_questions/507a8614b29a310200003391
Carlos Perez
5,939 PointsI don't think that's the question she was asking John W. but thank you for your fabulous expertise. ;)
Wenqian Guo
2,612 PointsHe did answer my question Carlos Perez, and thank you for not insulting me again! :)
Carlos Perez
5,939 PointsI insulted you? Oh dear sorry if you felt that.
Peter Hearne
6,803 Pointswell i guess its because CSS is text based code like how we also use text/html
Wenqian Guo
2,612 PointsYeah..I think that's the reason :)
Wenqian Guo
2,612 PointsWenqian Guo
2,612 PointsThank you!