w3c 对某些点的验证很奇怪

发布于 2024-08-22 10:24:08 字数 1454 浏览 3 评论 0原文

有人可以帮助我并解释为什么这没有经过验证吗?

我的文档类型:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

错误:

 1. line 55 column 14 - error: document
    type does not allow element "div"
    here; missing one of "object",
    "applet", "map", "iframe", "button",
    "ins", "del" start-tag

    <div id="tabs">

 2. line 62 column 24 - Fout: document
    type does not allow element "div"
    here; missing one of "object",
    "applet", "map", "iframe", "button",
    "ins", "del" start-tag

    <div style="clear:both;"></div>

  3. line 65 column 22 - Fout: document
     type does not allow element "div"
     here; missing one of "object",
     "applet", "map", "iframe", "button",
     "ins", "del" start-tag



  4. <div id="calculator">

     line 76 column 19 - Fout: document
     type does not allow element "div"
     here; missing one of "object",
     "applet", "map", "iframe", "button",
     "ins", "del" start-tag

     <div id="feature">

  5. line 83 column 7 - Fout: end tag for
     "a" omitted, but OMITTAG NO was
     specified 

     </div>

这是 html,也可以在此处查看。

http://www.coldcharlie.nl/test/

Can someone help me and explain me why this isn't validated?

My doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

The errors:

 1. line 55 column 14 - error: document
    type does not allow element "div"
    here; missing one of "object",
    "applet", "map", "iframe", "button",
    "ins", "del" start-tag

    <div id="tabs">

 2. line 62 column 24 - Fout: document
    type does not allow element "div"
    here; missing one of "object",
    "applet", "map", "iframe", "button",
    "ins", "del" start-tag

    <div style="clear:both;"></div>

  3. line 65 column 22 - Fout: document
     type does not allow element "div"
     here; missing one of "object",
     "applet", "map", "iframe", "button",
     "ins", "del" start-tag



  4. <div id="calculator">

     line 76 column 19 - Fout: document
     type does not allow element "div"
     here; missing one of "object",
     "applet", "map", "iframe", "button",
     "ins", "del" start-tag

     <div id="feature">

  5. line 83 column 7 - Fout: end tag for
     "a" omitted, but OMITTAG NO was
     specified 

     </div>

This is the html, which can be viewed here also.

http://www.coldcharlie.nl/test/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

趁微风不噪 2024-08-29 10:24:08

您不应将块级元素(例如

)放入内联元素(例如 )中>

在第 55 行,您有一个未关闭的 元素(超链接)。那么你就只有几个

You shouldn't put a block level element such as <div> inside an inline element such as <span> or <a>

On line 55 you have an <a> element (hyperlink) that isn't closed. Then you have few <div>s. The validator thinks these divs are inside the <a>.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文