为什么此代码在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>
中没有任何错误
答案 0 :(得分:3)
您不能将文字放在<blockquote>
标记内。您必须将其包装在另一个元素中,例如<p>
标记:
<blockquote>
<p>My text.</p>
</blockquote>
答案 1 :(得分:1)
blockquote
不应该直接包含文本。在验证之前,您需要将文本包装在单个p
标记或一系列p
标记中。
答案 2 :(得分:0)
注意:要将blockquote元素验证为严格的HTML / XHTML,该元素必须只包含其他块级元素,如下所示:
&LT; BLOCKQUOTE&GT; &lt; p&gt;这里有一个长引号,是一个长引号&lt; / p&gt; &LT; / BLOCKQUOTE&GT;