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

发布于 2024-09-05 07:26:52 字数 906 浏览 5 评论 0 原文

为什么此代码在 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/

Why this code showing error in W3C validator "character data is not allowed here"

<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>

It does not giving any error in this validator http://www.onlinewebcheck.com/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

过期情话 2024-09-12 07:26:52

您不能将文本放入

标记内。您必须将其包装在另一个元素中,例如

标记:

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

You can't put text inside a <blockquote> tag. You have to wrap it in another element such as a <p> tag:

<blockquote>
  <p>My text.</p>
</blockquote>
凯凯我们等你回来 2024-09-12 07:26:52

blockquote 不应直接包含文本。在验证之前,您需要将文本包装在单个 p 标记或一系列 p 标记中。

A blockquote is not supposed to directly contain text. You'll need to wrap your text in a single p tag or series of p tags before it'll validate.

你好,陌生人 2024-09-12 07:26:52

注意:要将 blockquote 元素验证为严格的 HTML/XHTML,该元素必须仅包含其他块级元素,如下所示:

<块引用>

这是一个长引用这里是一个长引用

来源:w3schools.com

Note: To validate a blockquote element as strict HTML/XHTML, the element must contain only other block-level elements, like this:

<blockquote>
<p>Here is a long quotation here is a long quotation</p>
</blockquote>

Source: w3schools.com

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文