My source code is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
<head>
<title>Hi</title>
</head>
<body>
<div id="content">
<a href="product_displayer.cgi">
<div style="background-image: url('../res/images/background.jpeg')">
<img src="../res/images/products/thumbnails/image.png" alt="hello"/>
<p>Hello hello hello</p>
</div>
</a>
</div>
</body>
</html>
If I try to validate the code, the W3C validator giving me this error:
document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag
How can I solve it?
<!DOCTYPE html>(and drop thexmlns="http://www.w3.org/1999/xhtml" xml:lang="it"part). XHTML 1.0 is long obsolete now. - sideshowbarkertext/html. In that case, dropping the xmlns is OK. However, if this is an XHTML file (with MIME typeapplication/xhtml+xml) the browser definitely needs this attribute! - Mr Lister