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 trialRodrigo Teixeira
1,417 PointsIs link type attribute opitional?
I noticed that when google fonts were linked to the html document, besides the standard attributes such as rel and href, there was also a type attribute that hasn't been used before when linking main and normalize sheets. I checked it out on the internet and many main css files are linked using the type attribute as well. Which led me to the following questions: is it optional? What is the difference between writing it or not? Thank you.
1 Answer
Meg Matty
Front End Web Development Techdegree Graduate 22,928 PointsFrom googling around and looking at HTML5 specs and MDN, it would appear that the type attribute on link tags is "purely advisory" and may not necessarily break anything if not included. "Advisory" seems to mean it's just good practice to inform readers of your code what type is being linked.
Ryan Frizzell
14,527 PointsRyan Frizzell
14,527 Pointshttp://stackoverflow.com/questions/5409114/is-type-text-css-necessary-in-a-link-tag