Html验证无效 [英] Html invalid validation

查看:119
本文介绍了Html验证无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我对HTML相当陌生,而且我使自己成为一个简单的html 5网站,并且我验证了可以检查错误,并且得到了这个结果:



<元素div不允许作为元素ul的子元素在这种情况下。 (抑制来自该子树的进一步错误)< div class =home>< a href =sitename />< li>< li>< / li> < / div>



以下是代码:

 < UL> 
< div class =home>< a href =sitename />< li>主页< / a>< / li>< / div>
< div class =About>< a href =#>< li>关于< / a>< / li>< / div>
< div class =Contact>< a href =#>< li>联系人< / a>< / li>< / div>
< div class =empty>< a href =#>< li> < / A>< /立GT;< / DIV>
< / ul>

我需要做些什么来修正错误?

这个背景。 (抑制来自该子树的进一步错误。)

 < div class =home>< a href =http ://rexnoz.zxq.net/><李>家庭和LT; / A>< /立GT;< / DIV> 

2.错误第15行,第67列:结束标记a违反嵌套规则。

 < div class =home>< a href =http://rexnoz.zxq.net/><立GT;家庭和LT; / A>< /立GT;< / DIV> 



<3>错误第15行,第67列:上次错误后无法恢复。

 < div class =home>< a href =http:/ /rexnoz.zxq.net/\"><li>Home</a></li></div> 

2,3点是你开始 div 里面 li 并且关闭 li fist应该是 div



from w3c


so I'm fairly new to HTML, and I'm making myself a simple site with html 5 and I was validation to check for errors and I got this:

Element div not allowed as child of element ul in this context. (Suppressing further errors from this subtree.)<div class="home"><a href="sitename/"><li>Home</a></li></div>

and here's the code:

<ul>
    <div class="home"><a href="sitename/"><li>Home</a></li></div>
    <div class="About"><a href="#"><li>About</a></li></div>
    <div class="Contact"><a href="#"><li>Contact</a></li></div>
    <div class="empty"><a href="#"><li>   </a></li></div>
</ul>

What do I have to do to fix the errors?

解决方案

its clear

1.Line 15, Column 22: Element div not allowed as child of element ul in this context. (Suppressing further errors from this subtree.)

    <div class="home"><a href="http://rexnoz.zxq.net/"><li>Home</a></li></div>

2.Error Line 15, Column 67: End tag a violates nesting rules.

    <div class="home"><a href="http://rexnoz.zxq.net/"><li>Home</a></li></div>

3.Error Line 15, Column 67: Cannot recover after last error. Any further errors will be ignored.

     <div class="home"><a href="http://rexnoz.zxq.net/"><li>Home</a></li></div>

what 2,3 point is that you started div inside the li and closed the li fist should be div

from w3c

这篇关于Html验证无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆