<风格> HTML正文中的标签 - 有效吗? [英] <style> tag inside HTML body - valid?

查看:66
本文介绍了<风格> HTML正文中的标签 - 有效吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在编写一些应该出现的PHP讨论板

里面

内容专有CMS的领域。因为我需要比

标准样式表提供的更多样式,所以我只添加了< style>在我的HTML中标记

代码。它在我测试的所有浏览器中都能正常工作,但它似乎比一个有效的解决方案更多

hack。


当然,我做了一些研究,但没有成功。所以这是我的问题

给你:


HTML + CSS标准是否允许< style> < body>内的标签?

问候,

Matthias

解决方案

2005年8月1日星期一20:28:38 +0200,Matthias Hullin

< ne ******* @ matthiasREMOVETHIS.hullin.net>写道:

当然我做了一些研究,但没有成功。所以这是我对你的问题:


我在你研究的哪个方面做得很好

HTML + CSS标准是否允许< style> < body>里面的标签?



< http://www.w3.org/TR/html401/present/styles.html#edef-STYLE>

-

, - - < - @ - PretLetters:''woest wyf'',遇见vele interesses:------- ---。

|博客| http://home.wanadoo.nl/b。 de.zoete / _private / weblog.html |

| webontwerp | http://home.wanadoo.nl/b。 de.zoete / html / webontwerp.html |

| zweefvliegen | http://home.wanadoo.nl/b。 de.zoete / html / vliegen.html |

` --------------------------- ----------------------- - < - @ ------------''


嗨芭芭拉,


谢谢你的回复。我当然知道这个页面:

STYLE元素允许作者将样式表规则放在文档的头部。 HTML允许文档的HEAD
部分中的任意数量的STYLE元素。




我仍​​然没有找到关于是否禁止使用样式元素的信息

其他地方。


问候,

Matthias


[报价修正 - >请包括您引用的部分

并将其归类。报价下面的回复。]


2005年8月1日星期一20:50:46 +0200,Matthias Hullin

< ne ***** **@matthiasREMOVETHIS.hullin.net>写道:

Barbara de Zoete:

2005年8月1日星期一20:28:38 +0200,Matthias Hullin
<是ne ******* @ matthiasREMOVETHIS.hullin.net>写道:

HTML + CSS标准是否允许< style>标签内< body>?
< http://www.w3.org/TR/html401/present/styles.html#edef-STYLE>


感谢您的支持答复。这个页面我已经知道了,当然:




< from it:>

STYLE element允许作者将样式表规则放在文档的头部。 HTML允许文档的HEAD
部分中的任意数量的STYLE元素。



我仍​​然没有发现是否禁止使用样式元素的信息
其他地方。




你认为人们甚至可以开始列出你不想要的东西吗?b $ b要做什么?

其次:为什么你还没试过呢?使用适当的

doctype创建一个模型页面并对其进行验证。看看会发生什么。


-

, - - < - @ - PretLetters:''woest wyf'',遇见了vele interesses :----------。

|博客| http://home.wanadoo.nl/b。 de.zoete / _private / weblog.html |

| webontwerp | http://home.wanadoo.nl/b。 de.zoete / html / webontwerp.html |

| zweefvliegen | http://home.wanadoo.nl/b。 de.zoete / html / vliegen.html |

` --------------------------- ----------------------- - < - @ ------------''


Hi,

I''m programming some PHP discussion board that is supposed to appear
inside
the content area of a proprietary CMS. As I need some more styles than the
standard stylesheet provides, I just added a <style> tag inside my HTML
code. It works fine in all the browsers I tested, but it seems to be more
of
a hack than a valid solution.

Of course I did some research, but without success. So here is my question
to you:

Do the HTML+CSS standards allow <style> tags inside the <body>?

Regards,
Matthias

解决方案

On Mon, 1 Aug 2005 20:28:38 +0200, Matthias Hullin
<ne*******@matthiasREMOVETHIS.hullin.net> wrote:

Of course I did some research, but without success. So here is my question
to you:

I wounder where you did your research
Do the HTML+CSS standards allow <style> tags inside the <body>?



<http://www.w3.org/TR/html401/present/styles.html#edef-STYLE>
--
,-- --<--@ -- PretLetters: ''woest wyf'', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------''


Hi Barbara,

thank you for your reply. This page I already knew, of course:

The STYLE element allows authors to put style sheet rules in the head of
the document. HTML permits any number of STYLE elements in the HEAD
section of a document.



Still I found no information whether it is forbidden to use style elements
elsewhere.

Regards,
Matthias


[Quote fixed --> Please include the part you quote
and attribute it too. Reply underneath the quote.]

On Mon, 1 Aug 2005 20:50:46 +0200, Matthias Hullin
<ne*******@matthiasREMOVETHIS.hullin.net> wrote:

Barbara de Zoete:

On Mon, 1 Aug 2005 20:28:38 +0200, Matthias Hullin
<ne*******@matthiasREMOVETHIS.hullin.net> wrote:

Do the HTML+CSS standards allow <style> tags inside the <body>?
<http://www.w3.org/TR/html401/present/styles.html#edef-STYLE>


thank you for your reply. This page I already knew, of course:



<from it:>

The STYLE element allows authors to put style sheet rules in the head of
the document. HTML permits any number of STYLE elements in the HEAD
section of a document.


Still I found no information whether it is forbidden to use style elements
elsewhere.



Do you think one can even begin to list the things that you are _not_ supposed
to do?
Secondly: why haven''t you just tried it? Create a mockup page with appropriate
doctype and get it validated. See what happens.

--
,-- --<--@ -- PretLetters: ''woest wyf'', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------''


这篇关于&LT;风格&GT; HTML正文中的标签 - 有效吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆