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?
MIME-type
on.css
files, but it seems it wasn't ever necessary. I use it just for consistency's sake.type="text/css"
, but the Stackoverflow site is still using it.