简体   繁体   English

标记验证服务问题

[英]Markup Validation Service problems

i have some problems in order to validate my webpage. 我有一些问题才能验证我的网页。 here I list them if you can please help me. 如果可以,请在这里列出他们。


element X undefined 元素X未定义

You have used the element named above in your document, but the document type you are using does not define an element of that name. 您在文档中使用了上面命名的元素,但是您使用的文档类型并未定义该名称的元素。 This error is often caused by: 此错误通常是由以下原因引起的:

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

document type does not allow element X here; 文档类型此处不允许元素X; missing one of Y start-tag 缺少Y开始标签之一

The mentioned element is not allowed to appear in the context in which you've placed it; 所提到的元素不允许出现在放置它的上下文中。 the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. 提到的其他元素是唯一允许在此使用并且可以包含提到的元素的元素。 This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. 这可能意味着您需要一个包含元素,或者可能您已忘记关闭上一个元素。

One possible cause for this message is that you have attempted to put a block-level element (such as " 出现此消息的可能原因是您尝试放置一个块级元素(例如“

" or "") inside an inline element (such as "", "", or ""). 内联元素(例如“”,“”或“”)内的“或”。

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

thnx in advance, Mr.Roll 提前谢谢,罗尔先生

So yeah, just to expand on my comment to the question, the problem with Dandy Roll's code is that he is validating his markup against the XHTML 1.0 Strict DTD. 是的,在我对问题的评论中,Dandy Roll的代码存在的问题是,他正在针对XHTML 1.0 Strict DTD验证其标记。 In particular, he made use of the <figure> tag (which did not come into standard existence until HTML 5), so his document would not validate. 特别是,他使用了<figure>标记(直到HTML 5才标准存在),因此他的文档无法验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM