Forum Moderators: open
Now, I was all **** and tried to validate it. It validated perfectly. So I teared the code apart and still couldn't find the problem, until I viewed it in Opera with the debugging stylesheet turned on. That solved it.
Anyhow, I re-validated, thinking there was some </div> I was missing... But it still validated! O_o The only thing I had done was to remove an opening <div>.
So, how come the <div> can be an empty element? I thought it was defined as a block element, and that all block elements must be closed...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>My first HTML document</TITLE>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
</HEAD>
<BODY>
<div>Testing - Hello World.</div>
</BODY>
</HTML>
which validates for HTML 4.01 Strict. When I removed either the opening or the closing tag - it wouldn't validate. So I'm not sure what's going on with your code but the validator does require both the opening and closing tag for the DIV element be present.
Strange, I can't seem to reproduce it either.
Might've been that W3C discovered the bug and fixed it, or that I was mistaken and there was no bug in the first place. But whatever the reason, it correctly warns now atleast.
Dammit, I wish I had saved a backup of the faulty code... Ah well. I'll make sure to do it next time. :)
Thanks for the help, appreciate it.