Reputation: 105
W3C validation is giving me the above error on the following on the line:
<div id='main' style='border:1px solid #999;'>
in the following code:
<!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="en" lang="en"><body>
<p>
<label for="wrap">Quick Reference:</label>
<div id='main' style='border:1px solid #999;'>
<div id='wrap' ></div>
</div>
</p>
</body>
</html>
Thanks in advance
Upvotes: 0
Views: 619
Reputation: 943547
You can't have a div inside a paragraph, and the content you do have doesn't look like a paragraph. Replace the p
with div
(which is a generic block level container for when a more suitable element does not exist in HTML).
Additionally, labels label form controls not divs. You probably should have a heading (possibly an h1
but more likely h2
if there was more context) not a label
. Headings also cannot appear inside paragraphs.
Upvotes: 1