More out of general interest more than anything, but what's the difference between
<link rel="stylesheet" href="/css/test.css" type="text/css"/>
and
<link rel="stylesheet" href="/css/test.css" type="text/stylesheet"/>
There appear to be some differences to the style in different browsers, but I can't really point to anything specific - is there any real difference between using either of these?
Definition and Usage The type attribute specifies the Internet media type (formerly known as MIME type) of the <style> tag. The type attribute identifies the content between the <style> and </style> tags. The default value is "text/css", which indicates that the content is CSS.
It's not required with the HTML5 spec, but for older versions of HTML is it required. Type stands for The MIME type of the style sheet.
text/stylesheet
is not a valid type for the link
element.
You should use text/css
.
You are probably seeing a difference in browsers because some browsers have taken into account people might incorrectly use type="text/stylesheet"
instead of type="text/css"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With