Dan
Dan

Reputation: 3870

HTML5 assumed Mime Types

I've been experimenting with HTML5 lately, and found it of interest that when adding javascript to pages, 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?

Upvotes: 0

Views: 509

Answers (2)

Ludovico Fischer
Ludovico Fischer

Reputation: 1602

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.

Upvotes: 1

Demian Brecht
Demian Brecht

Reputation: 21368

http://www.w3.org/TR/html5/obsolete.html looks like it sums them all up fairly well.

Upvotes: 2

Related Questions