Here is my piece of code which gives me error:
<ul>
<li>
<div><span>Text</span></div>
<div>
<ul>
<li>
<a href="#">
<div>Link</div>
</a>
</li>
</ul>
</div>
</li>
</ul>
An error:
document type does not allow element “DIV” here; missing one of “APPLET”, “OBJECT”, “MAP”, “IFRAME”, “BUTTON” start-tag
<div>elements are not allowed inside<a>elements (until HTML 5 which doesn’t use DTDs and supports the transparent content model).(The DTD allows applet, object, map, iframe and button inside a elements, and it allows div inside all those elements, but the specification forbids the combination of those two factors in the text, it is a limitation of DTDs which is why the valdator suggests that as a fix).