0

为了验证我的网页,我遇到了一些问题。如果你能帮助我,我在这里列出它们。


元素 X 未定义

您在文档中使用了上述元素,但您使用的文档类型未定义该名称的元素。此错误通常由以下原因引起:

incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

Line 68, column 16: element "figure" undefined

        <figure***>***

文档类型在此处不允许元素 X;缺少一个 Y 开始标签

✉</p>

所提到的元素不允许出现在您放置它的上下文中;其他提到的元素是唯一允许在那里并且可以包含提到的元素的元素。这可能意味着您需要一个包含元素,或者您可能忘记关闭前一个元素。

此消息的一个可能原因是您试图放置一个块级元素(例如“

" 或 "") 内联元素(例如 ""、"" 或 "")。

Line 44, column 36: document type does not allow element "h4" here; missing one of "object", "ins", "del", "map", "button" start-tag

            <p><h4 class="titlepub"***>***&nbsp;<a href="http................

提前谢谢,Roll 先生

4

1 回答 1

0

所以,是的,只是为了扩展我对这个问题的评论,Dandy Roll 代码的问题在于他正在根据 XHTML 1.0 Strict DTD 验证他的标记。特别是,他使用了<figure>标签(直到 HTML 5 才成为标准存在),因此他的文档无法验证。

于 2011-08-20T03:38:37.957 回答