Is type=”text/css” necessary in a tag?

I was wondering whether or not it is necessary to use <link rel="stylesheet" type="text/css" href=...> over <link rel="stylesheet" href=...>. The rel="stylesheet" marks the information that it is a stylesheet – so text/css doesn’t actually add anything as far as I’m concerned.

The only stylesheet format used by HTML is CSS anyway, so what does text/css ‘say’ to the browser? Some websites seem to add the type="text/css" attribute (http://www.jquery.com/), whilst other ones don’t (http://www.youtube.com/).

So, what is the use of type="text/css" in a <link rel="stylesheet"> element, and is it necessary to include it?

6 Answers
6

Leave a Comment