这是一个无效的html 4严格文件的有趣案例。 总之,如果你有< body>< / bodywithout任何内容,那么文件 在html 4 strict下无效。如果html 4丢失则有效。 <!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN" http://www.w3/ TR / html4 / strict.dtd"> < html> < head> < META HTTP-EQUIV =" Content-Type" CONTENT =" text / html; charset = utf-8"> < title>< / title> < / head> < body> < / body> < / html> Xah a ?? xahlee/ a? ?
解决方案2008年6月21日星期六04:25:02 -0700(PDT),/ Xah /: 这是一个有趣的无效html 4严格文件的案例。 总之,如果你有< body>< / bodywithout任何内容,文件 在html 4 strict下无效。如果html 4输了则有效。
是的,根据Strict < www.w3/TR/html401/sgml这是正确的/dtd.html>:
<! - ===================文件正文== ================================== - > <!ELEMENT BODY OO(%block; | SCRIPT)+ +(INS | DEL) - 文件正文 - >和Transitional< http://www.w3/TR/html401/sgml/loosedtd.html>:
<! - ===================文件正文================= =================== - > <!ELEMENT BODY OO(%flow;)* +(INS | DEL) - 文件正文 - >文件类型定义。 - Stanimir
On Sat,2008年6月21日04:25:02 -0700(PDT),Xah写道: <!DOCTYPE HTML PUBLIC " - // W3C // DTD HTML 4.01 // EN" http://www.w3/ TR / html4 / strict.dtd"> < html> < head> < META HTTP-EQUIV =" Content-Type" CONTENT =" text / html; charset = utf-8"> < title>< / title> < / head> < body> < / body> < / html>你好Xah。要验证它,你必须在 < title>< / title>中加入一些东西。 希望你很好, Ian - 最好是懒散和丢失而不是b / b 根本没有闲逛。 (James Thurber) rastallian.blogspot/
Scripsit Lance Manyon: 为了验证它,你必须把东西放在中< title>< / title>。
不,你不是。 (当然,含有空内容的标题元素是一个糟糕的想法,但这与验证无关。) 下次,考虑到在发布之前最少测试你的建议。 (任何能阅读DTD并因此提供有关 验证的明智建议的人当然可以立即看到你的建议是错误的。) - Jukka K. Korpela(Yucca) www.cs.tut.fi/~jkorpela/
Here''s a interesting case of invalid html 4 strict file. In summary, if you have <body></bodywithout any content, the file would be invalid under html 4 strict. Valid if html 4 lose. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "www.w3/ TR/html4/strict.dtd"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=utf-8"> <title></title> </head> <body> </body> </html> Xah a?? xahlee/ a??
解决方案 Sat, 21 Jun 2008 04:25:02 -0700 (PDT), /Xah/: Here''s a interesting case of invalid html 4 strict file. In summary, if you have <body></bodywithout any content, the file would be invalid under html 4 strict. Valid if html 4 lose.Yes, it is correct according to the Strict <www.w3/TR/html401/sgml/dtd.html>:
<!--=================== Document Body ====================================--> <!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->and Transitional <www.w3/TR/html401/sgml/loosedtd.html>:
<!--=================== Document Body ====================================--> <!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body -->document type definitions. -- Stanimir
On Sat, 21 Jun 2008 04:25:02 -0700 (PDT), Xah wrote: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "www.w3/ TR/html4/strict.dtd"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=utf-8"> <title></title> </head> <body> </body> </html>Hi Xah. For it to validate, you have to put something in the <title></title>. Hope you''re well, Ian -- It is better to have loafed and lost than never to have loafed at all. (James Thurber) rastallian.blogspot/
Scripsit Lance Manyon: For it to validate, you have to put something in the <title></title>.No you don''t. (Of course, a title element with empty content is a bad idea, but that has nothing to do with validation.) Next time, considering at least testing your advice before posting it. (Anyone who can read DTDs and therefore give informed advice on validation can immediately see that your advice is wrong, of course.) -- Jukka K. Korpela ("Yucca") www.cs.tut.fi/~jkorpela/
更多推荐
<身体GT;< /体>是无效的html 4严格?
发布评论