The type attribute of SCRIPT and STYLE elements in HTML?

I heard (from Crockford) what type attributes on LINK and SCRIPT elements are superfluous when those elements are used to load external resources. (Because the HTTP response determines the content-type of the resource.)

<link rel="Stylesheet" href="foo.css">

<script src="foo.js"></script>

But what about the case when non-HTML code is placed inline inside the STYLE and SCRIPT elements?

<style>
    /* inline CSS rules */
</style>

<script>
    // inline JavaScript code
</script>

Is setting the type attribute in those cases recommended? Есть ли какие-либо проблемы, когда мы решаем опустить атрибут типа?

7
задан Deduplicator 1 February 2015 в 16:29
поделиться