Why does the <style> tag in HTML take a type attribute?
I mean does anyone us开发者_JAVA百科e a value different than "text/css"?
CSS and JavaScript might have killed all their rivals and dominated the browser, but other languages have existed, and the victory of CSS/JS was much less certain when HTML 4 was being written.
For stylesheets, the only real contender was JSSS, which saw support in Netscape 4 (which had really poor CSS support due to it being an emulation layer over its JSSS engine).
There is text/xsl. It is also good design to make it possible to add new alternative style types in the future.
What if someone creates a new, better "stylesheet language"? Change the HTML specification?
I would say, this is an application of loose coupling.
精彩评论