HTML5 assumed Mime Types
I've been experimenting with HTML5 lately, and found it of interest that when adding javascript to pages, 开发者_JAVA技巧you no longer need to declare the scripting language as you did previously. It assumes that javascript is being used unless you specifically declare another language with a mime type.
OLD:
<script type="text/javascript"> // Do Something </script>
NEW:
<script> // Do Something </script>
What I'm wondering is if HTML5 assumes other mime types as well - for including css or favicons, etc.
Anyone know where I could find more info on this?
http://www.w3.org/TR/html5/obsolete.html looks like it sums them all up fairly well.
You can also drop the type attribute in a stylesheet link. Just use:
<link rel="stylesheet" href="style.css" />
without type="text/css"
.
Dive into HTML5 by Mark Pilgrim contains a chapter covering this sort of subject.
精彩评论