简体   繁体   English

在这种情况下,不允许将li元素作为element body的子元素

[英]element li not allowed as child of element body in this context

I'm trying some basic html stuff and I get to this error and I have no idea why is that. 我正在尝试一些基本的html东西,但出现此错误,我不知道为什么会这样。 Thanks for help. 感谢帮助。

<!DOCTYPE html>
<html>
    <head>
        <title>supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <h4>ČGK Tour 2015 - 2. turnaj - Kotlina</h4>
                <ul>
                    <li>Datum a místo konání: středa 22.4.2015</li>
                </ul>   
    </body>
</html>

And I keep getting this error: 而且我不断收到此错误:

Element "li" not allowed as child of element "body" in this context. 在这种情况下,元素“ li”不允许作为元素“ body”的子代。 (Suppression furter errors from subtree.) From line 16, column 21; (从子树中抑制错误。)从第16行第21列开始; to line 16, column 24 (Rule category: Elements structure) 至第16行第24列(规则类别:元素结构)

Yes, even I dont notice any error in your code. 是的,即使我没有注意到您的代码中有任何错误。 I even tried validating it against HTML5 validator but its absolutely fine. 我什至尝试根据HTML5验证器对其进行验证,但绝对可以。

Can you please elaborate if you are still facing the same error. 如果您仍然遇到相同的错误,请详细说明一下。 Or you even mention if you are utilizing some IDE for that. 或者甚至提到是否为此使用了一些IDE。

暂无
暂无

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

相关问题 在这种情况下,不允许将元素样式作为元素主体的子元素 - Element style not allowed as child of element body in this context 在此上下文中不允许元素样式作为元素主体的子元素( <style scoped> not validating) - Element style not allowed as child of element body in this context (<style scoped> not validating) HTML 验证器错误 - 在此上下文中不允许元素滑块作为元素主体的子元素 - HTML Validator Error - Element slider not allowed as child of element body in this context 在这种情况下,不允许将元素管理员作为元素范围的子级 - Element admin not allowed as child of element span in this context 在这种情况下,元素img不允许作为元素图片的子元素 - Element img not allowed as child of element picture in this context 在这种情况下,元素div不允许作为元素ol的子元素 - Element div not allowed as child of element ol in this context 在这种情况下,不允许将元素样式作为元素主体的子元素。 (抑制此子树中的其他错误。) - Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.) 内容不允许作为元素主体html的子元素出现错误 - content not allowed as child of element body html error html5/css- 在此上下文中不允许元素 li 作为元素 div 的子元素。 (抑制来自该子树的更多错误。) - html5/css- Element li not allowed as child of element div in this context. (Suppressing further errors from this subtree.) 流浪开始标签头,在此上下文中不允许元素样式作为元素主体的子元素。 (抑制此子树中的其他错误。) - Stray start tag head, Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM