W3验证器错误,文档类型不允许元素“div”这里; [英] W3 validator error, document type does not allow element "div" here;

查看:134
本文介绍了W3验证器错误,文档类型不允许元素“div”这里;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的html页面中有这个代码。

I have this code in my html page.

<a href="#"><div id="icon_in"></div></a>



W3验证器显示此错误。

文档类型不允许元素div在这里;缺少object,applet,map,iframe,button,ins,delstart-tag

我尝试使用span标签修复它,然后错误消失但没有显示跨度背景图像。

如何解决?


W3 validator show me this error.
document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
I try to fixed it using span tag, then error gone but not showing span background image.
How can I fixed if?

推荐答案

也许尝试包含你的< a>你的< div>里面的标签标签,而不是相反?
Maybe try to include your <a> tag inside your <div> tag, instead of the contrary?


这篇关于W3验证器错误,文档类型不允许元素“div”这里;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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