HTML合规性 [英] HTML compliance
问题描述
什么构成符合最低价格符合b * b标准的HTML文件的官方文档?
-
http://www.standards.com/; 请参阅Howard Kaikow的网站。
Where is the official documentation of what constitutes a minimally
compliant HTML file?
--
http://www.standards.com/; See Howard Kaikow''s web site.
推荐答案
Howard Kaikow写道:
Howard Kaikow wrote:
什么构成最低限度的HTML文件的官方文档在哪里?
Where is the official documentation of what constitutes a minimally
compliant HTML file?
的单词拼写出来。
至少HTML 4.01 Strict文档必须包含Doctype,一个标题,
和一些内容(因为正文中的块级元素很多因为
元素[1]不能直接保存字符数据)。
但是,包括HTML,HEAD和BODY标签也是很好的做法,因为浏览器通常不会将HTML作为SGML应用程序实现。
[ 1] body元素的标签是可选的,但它仍然存在。
-
David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>
Home是〜/ .bashrc的地方
http://w3.org/TR/html4/ - although I don''t think it is spelt out in so many
words.
At a minimum an HTML 4.01 Strict document must contain the Doctype, a title,
and some content (which much be in a block level element since the body
element[1] cannot hold character data directly).
However, its good practise to include the HTML, HEAD, and BODY tags too
since browsers don''t usually implement HTML as an SGML application.
[1] The tags for the body element are optional, but it still exists.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
在文章< co*******************@news.demon.co.uk>,
David Dorward< do ***** @ yahoo .COM>写道:
In article <co*******************@news.demon.co.uk>,
David Dorward <do*****@yahoo.com> writes:
至少HTML 4.01 Strict文档必须包含Doctype,标题,
和一些内容
At a minimum an HTML 4.01 Strict document must contain the Doctype, a title,
and some content
Not *内容*,足够*标记*表示必要的部分
的结构。
<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN">< title //< p /
到OP:你的回答是42.
-
Nick Kew
Not *content*, just sufficient *markup* to imply the necessary parts
of a structure.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><title//<p/
To the OP: your answer is 42.
--
Nick Kew
Nick Kew写道:
Nick Kew wrote:
<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN">< title //< p /
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><title//<p/
是的,虽然这在技术上是有效的,OP应该知道最多
用户代理不支持该示例中使用的SHORTTAG语法。一个
最低限度符合文档,也将在所有
用户代理中正确解析:
<!DOCTYPE HTML PUBLIC " - // W3C // DTD HTML 4.01 // EN">< title>< / title>< p>
忽略空白差异[1]现在,上面相当于下面的
,并且会产生一个相同的DOM。
<!DOCTYPE HTML PUBLIC" - // W3C / / DTD HTML 4.01 // EN">
< html>
< head>
< title>< / title> ;
< / head>
< body>
< p>< / p>
< / body>
< / html>
[1]注意:空格实际上会导致DOM中的文本节点,
但是出于这个例子的目的,可以忽略它。
-
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ 重新发现网页
http://SpreadFirefox.com/ 点亮网页
Yes, while that is technically valid, the OP should be aware the most
user agents do not support the SHORTTAG syntax used in that example. A
minimally conforming document, that will also be parsed correctly in all
user agents:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><title></title><p>
Ignoring the whitespace differences [1] for now, the above is equivalent
to the following, and will produce an identical DOM.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title></title>
</head>
<body>
<p></p>
</body>
</html>
[1] Note: Whitespace does actually result in a text node within the DOM,
but for the purpose of this example, it can be ignored.
--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://SpreadFirefox.com/ Igniting the Web
这篇关于HTML合规性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!