Emanuil Rusev
Emanuil Rusev

Reputation: 35235

Why does the <style> tag in HTML take a type attribute?

I mean does anyone use a value different than "text/css"?

Upvotes: 9

Views: 272

Answers (3)

Sjoerd
Sjoerd

Reputation: 75588

There is text/xsl. It is also good design to make it possible to add new alternative style types in the future.

Upvotes: 2

Felix Kling
Felix Kling

Reputation: 816312

What if someone creates a new, better "stylesheet language"? Change the HTML specification?

I would say, this is an application of loose coupling.

Upvotes: 1

Quentin
Quentin

Reputation: 943163

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).

Upvotes: 17

Related Questions