style type="text/css" ... what else is there?
Asked Answered
T

6

13

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>
Tap answered 20/5, 2011 at 21:50 Comment(2)
So your question is "Are there any other styling languages besides CSS"?Tameratamerlane
@Šime basically, yes. It's also a half-question about why the style tag has the "type" parameter at all if CSS is (almost?) always used.Tap
F
8

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:

http://www.w3.org/Style/

http://www.w3.org/Style/XSL/

Fustanella answered 20/5, 2011 at 22:5 Comment(0)
S
3

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.

Siffre answered 21/5, 2011 at 9:56 Comment(0)
H
1

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:

http://www.w3.org/TR/html4/types.html#type-content-type

Hans answered 20/5, 2011 at 21:55 Comment(0)
O
1

It is the content type (MIME Type). There are other types, but not applicable to the style tag.

Overline answered 20/5, 2011 at 21:57 Comment(0)
P
1

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

Pibgorn answered 20/5, 2011 at 21:57 Comment(1)
In other words, HTML5 officially lets you assume that any <style> tags have a MIME type of text/css? Tomasz notes that html4 specifications indicate that "authors must supply [it]".Tap
D
0

There are not. But there conceivably could be.

Dorado answered 20/5, 2011 at 21:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.