style type =“text / css”......还有什么?

时间:2022-10-25 07:34:15

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?

除了“text / css”之外,还有其他类型的浏览器支持样式标记吗? (不包括css的任何同义词)。如果没有,那么为什么不呢?

<style type="???"> ... </style>

6 个解决方案

#1


7  

There also are XSL (Extensible Stylesheet Language) stylesheets for styling XML documents. They cannot be used with HTML though.

还有用于样式化XML文档的XSL(可扩展样式表语言)样式表。但它们不能与HTML一起使用。

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

CSS适用于XML文档,但建议使用XSL。与CSS相反,XSL是一种转换语言(将用正式语言编写的输入文本转换为修改后的输出文本)。

Further references:

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

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

#2


3  

There were others. JSSS was implemented by Netscape 4.

还有其他人。 JSSS由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

这里有一个不错的总结 - 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.

请注意,在浏览器和HTML5中,type属性是可选的。如果省略,则假定为“text / css”。

#3


1  

Style type defines how will the text between this tags read. This page states as follows [14.2.3]:

样式类型定义了此标记之间的文本读取方式。该页面如下[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.

属性定义type = content-type [CI]此属性指定元素内容的样式表语言,并覆盖默认样式表语言。样式表语言被指定为内容类型(例如,“text / css”)。作者必须为此属性提供值;此属性没有默认值。

So text/css is the only one if you want it to be CSS. For the other ones refer to:

所以如果你想让它成为CSS,text / css是唯一的。对于其他人,请参阅:

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

#4


1  

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

它是内容类型(MIME类型)。还有其他类型,但不适用于样式标记。

#5


1  

It just specifies the MIME content type of the element. The only styling language used in websites is text/css.

它只是指定元素的MIME内容类型。网站中使用的唯一样式语言是text / css。

If using the HTML5 doctype, you can simply use <style>#css{is:awesome}</style>.

如果使用HTML5 doctype,您只需使用

#6


0  

There are not. But there conceivably could be.

没有。但可以想象的可能是。

#1


7  

There also are XSL (Extensible Stylesheet Language) stylesheets for styling XML documents. They cannot be used with HTML though.

还有用于样式化XML文档的XSL(可扩展样式表语言)样式表。但它们不能与HTML一起使用。

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

CSS适用于XML文档,但建议使用XSL。与CSS相反,XSL是一种转换语言(将用正式语言编写的输入文本转换为修改后的输出文本)。

Further references:

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

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

#2


3  

There were others. JSSS was implemented by Netscape 4.

还有其他人。 JSSS由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

这里有一个不错的总结 - 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.

请注意,在浏览器和HTML5中,type属性是可选的。如果省略,则假定为“text / css”。

#3


1  

Style type defines how will the text between this tags read. This page states as follows [14.2.3]:

样式类型定义了此标记之间的文本读取方式。该页面如下[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.

属性定义type = content-type [CI]此属性指定元素内容的样式表语言,并覆盖默认样式表语言。样式表语言被指定为内容类型(例如,“text / css”)。作者必须为此属性提供值;此属性没有默认值。

So text/css is the only one if you want it to be CSS. For the other ones refer to:

所以如果你想让它成为CSS,text / css是唯一的。对于其他人,请参阅:

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

#4


1  

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

它是内容类型(MIME类型)。还有其他类型,但不适用于样式标记。

#5


1  

It just specifies the MIME content type of the element. The only styling language used in websites is text/css.

它只是指定元素的MIME内容类型。网站中使用的唯一样式语言是text / css。

If using the HTML5 doctype, you can simply use <style>#css{is:awesome}</style>.

如果使用HTML5 doctype,您只需使用

#6


0  

There are not. But there conceivably could be.

没有。但可以想象的可能是。