Are there any other types that browsers support for the style tag besides "text/css"? (Excluding any synonyms for css). If not, then why not?
<style type="???"> ... </style>
Are there any other types that browsers support for the style tag besides "text/css"? (Excluding any synonyms for css). If not, then why not?
<style type="???"> ... </style>
There also are XSL (Extensible Stylesheet Language) stylesheets for styling XML documents. They cannot be used with HTML though.
CSS works for XML docs, but using XSL is recommended. Opposed to CSS, XSL is a Transformation Language (transforms input text written in a formal language into a modified output text).
Further references:
There were others. JSSS was implemented by Netscape 4.
There's a decent summary here - http://www.articlesbase.com/web-design-articles/other-styling-languages-in-the-market-available-or-not-4036049.html
Note that in browsers, and in HTML5, the type attribute is optional. If it is omitted, "text/css" is assumed.
Style type defines how will the text between this tags read. This page states as follows [14.2.3]:
http://www.w3.org/TR/html4/present/styles.html
Attribute definitions type = content-type [CI] This attribute specifies the style sheet language of the element's contents and overrides the default style sheet language. The style sheet language is specified as a content type (e.g., "text/css"). Authors must supply a value for this attribute; there is no default value for this attribute.
So text/css is the only one if you want it to be CSS. For the other ones refer to:
It is the content type (MIME Type). There are other types, but not applicable to the style tag.
It just specifies the MIME content type of the element. The only styling language used in websites is text/css
.
If using the HTML5 doctype, you can simply use <style>#css{is:awesome}</style>
.
<style>
tags have a MIME type of text/css
? Tomasz notes that html4 specifications indicate that "authors must supply [it]". –
Tap © 2022 - 2024 — McMap. All rights reserved.