为什么这段代码在W3C验证器中显示错误?

问题描述:

为什么显示W3C验证错误的代码“字符数据在这里不允许”为什么这段代码在W3C验证器中显示错误?

<blockquote>all visible objects, man, are but as pasteboard masks. 
     But in each event -- in the living act, the undoubted 
     deed -- there, some unknown but still reasoning thing 
     puts forth the mouldings of its feature from behind 
     the unreasoning mask. If man will strike, strike 
     through the mask. All visible objects, man, are but as pasteboard masks. 
     But in each event -- in the living act, the undoubted 
     deed -- there, some unknown but still reasoning thing 
     puts forth the mouldings of its feature from behind 
     the unreasoning mask. If man will strike, strike 
     through the mask.</blockquote> 

它不会给任何错误在此验证http://www.onlinewebcheck.com/

+0

我从来没有听说过onlinewebcheck.com,但W3C验证是权威之一。 – 2010-06-10 16:19:10

一个是不应该直接包含文本。在您验证之前,您需要将文字封装在一个p标签或p标签系列中。

您不能将文本放在<blockquote>标记中。你必须把它包起来的另一个元素,如<p>标签:

<blockquote> 
    <p>My text.</p> 
</blockquote> 

注:为了验证块引用元素作为严格的HTML/XHTML,元素只能包含其他块级元素,像这样:

<块引用> <p>这里是这里长的引用是一个长期的报价</p > < /块引用>

来源:w3schools.com

+1

神圣的废话,一个w3schools页面,实际上有准确和有用的信息! – DisgruntledGoat 2010-06-11 12:00:06