【发布时间】:2014-03-27 17:55:19
【问题描述】:
http://jsfiddle.net/cEv2S/ - 我的索引页,无法通过 xhtml 1.1 标准验证
我收到验证错误“第 38 行,第 6 列:元素“nav”未定义“
<div id="header">Leon's CS150 Assignment</div>
<nav> <!-- this is the line quoted in my error message -->
<div>
<a class="Menu-Item" href="#">Home</a>
<a class="Menu-Item" href="about.html">About</a>
<a class="Menu-Item" href="cv.html">CV</a>
<a class="Menu-Item" href="../wordpress">Wordpress</a>
<a class="Menu-Item" href="../webshop/catalog">Webshop</a>
</div>
</nav>
我的导航在我的 CSS 中明确定义,并且在我尝试验证之前一直很好,有人知道为什么会这样吗?我什至声明了文档类型。
提前致谢。
【问题讨论】:
-
您在 HTML5 中使用了错误的 DOCTYPE。
标签: css html w3c-validation