对某些点进行奇怪的w3c验证

时间:2010-02-24 22:06:21

标签: xhtml w3c

有人可以帮我解释一下为什么没有经过验证吗?

我的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">

错误:

 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/

1 个答案:

答案 0 :(得分:1)

您不应将<div>等块级元素放在内联元素中,例如<span><a>

在第55行,您有一个未关闭的<a>元素(超链接)。那你几乎没有<div>。验证者认为这些div在<a>内。