Why this is not allowed:
whereas this is allowed:
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. This may help to understand why we use the tags we do.
About Styles https://www.w3.org/Style/
About Scripts https://www.w3.org/TR/2011/WD-html5-author-20110705/the-script-element.html
Do you know when all these tags introduced in HTML? There is a reason why the <LINK>
tag is used instead of the <style>
tag.
It makes the most sense for individuals using HTML who want to see where HTML has been and where it is going.
<link>
tag was added to this version. The <LINK>
tag is presented as a general purpose link to other documents. Styling sheets are indicated as a possibility.<link rel="stylesheet" href="styles.css">
<style>
tag "Reserved for future use with internal style sheet."<style type="text/css"> </style>
So the <link>
tag is already used to include the external style in the page.
The <style>
tag was introduced after the <link>
tag, but it is not used to include external style.
Because there was already a <link>
tag to include the external style and HTML has never devalued a single tag.
Sources used: Link