我正在通过W3C验证运行我的XHTML文件,并且出现错误。但是,我无法理解错误 - 它说,"范围内没有p元素,但看到了p结束标记"。
有些新鲜的眼睛可以看到吗?
这是我的代码:
<div id="mainBody">
<div id="text">
<p>
<img src="images/billyGraham.png" alt="Billy Graham">
<blockquote>
Billy Graham:<br><br>
Is it not arrogance or narrow-mindedness to claim that there is only one way of salvation or that the way we follow is the right way? I think not. After all, do we fault a pilot for being narrow-minded when he follows the instrument panel [while] landing in a rainstorm? No, we want him to remain narrowly focused!
</blockquote>
</p>
</div>
</div>
答案 0 :(得分:0)
blockquote
元素不能位于P
元素内。它的HTML无效。虽然如果您已经在目标浏览器中进行了测试并且没有任何问题我也不会过于担心,但验证只是一个指导原则而且不应过于字面意义(IMO)