Tuesday, 07 November, 2006

Broken HTML

I've been head-down here the last couple of weeks installing a Linux server and trying to get up to speed with some PHP scripting.  I have a lot of notes that I'd like to turn into diary entries, but time to do that is pretty scarce right now.

I ran across an odd one today, though.  My new login script contained this line of HTML:

<td<input type="text" size="32" name="loginUsername" /></td>

That line is obviously broken because the closing brace is missing on the td tag.  The weird thing is that I'd been working with that for a couple of days and didn't notice because Firefox rendered it just fine.  Internet Explorer, when I tested with it this afternoon, failed to show the input box.

I'd make the argument that Firefox is in error here, but seeing as how browsers are unreasonably expected to render horribly broken HTML, there are probably very vocal people who would disagree with me.  I can't help but wonder how much more robust and how much faster Web browsers would be if we could somehow force Web authors to create well-formed HTML.

More as I learn a bit about this stuff.