<身体GT;< /体>是无效的html 4严格?

编程入门 行业动态 更新时间:2024-10-28 14:23:48
本文介绍了<身体GT;< /体>是无效的html 4严格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这是一个无效的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/

更多推荐

&LT;身体GT;&LT; /体&GT;是无效的html 4严格?

本文发布于:2023-11-26 22:49:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635527.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:身体   LT   amp   GT   html

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!