What exactly does the Link "type" attribute do?


#1


Link here!


So my code doesn't behave incorrectly, I'm just still confused on what the link "type" attribute does. And why it's necessary in the html file, I'd appreciate knowing about it.


<link type="text/css" rel="stylesheet" href="stylesheet.css" />


#2

The type attribute tells the browser the MIME TYPE of the resource so it will know how to parse it. HTML5 has relaxed the need for this attribute since CSS is the de facto style sheet language in browsers. Some user agents may still depend upon it.

The rel attribute tells the browser the relation of the resource to the document.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.