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

CSS CSS Foundations Selectors Type Selectors

Ken Hibino
Ken Hibino
17,009 Points

link tag in html file

When you link an external stylesheet to an HTML file, in the <link> tag you don't have to put type="text/css"? Some of my textbooks say you should put rel, type, and href in your link tags, but some of the treehouse videos, they are not using type attribute. Is there a difference?

1 Answer

Hi Ken,

From the W3 - link element

type - Hint for the type of the referenced resource

In other words, it is optional.

Cheers