Thursday, March 25, 2004

Not the greatest HTML


Why can't we have better HTML? Although of course complex things get -- well -- complex, I don't think it's very hard to produce good basic HTML by hand, So why can't the fancy tools do fancy HTML well?

I've started studying the HTML 4.01 spec in earnest, and as a result looking somewhat askance at what's out there on the web. So far it looks like the worst offender is MicroSoft Front Page, at least of the really bad stuff I've investigated. (Often there is a "Generator" META tag, which I suppose you could call a brag tag, that claims responsibility for the atrocity.)

I can produce bad HTML with the tools I customarily use, but those same tools have built-in checkers, so I can find out right away, and I don't have an excuse not to.

These blogs don't have particularly clean HTML, and the blank page (Create New Post) has these errors as reported by iCab (don't try this at home, or at least without replacing the tag delimiters ( < and > ) with their disguises ( &lt; and &gt; ) ).

Warning (1/1): <!DOCTYPE> is missing.
Warning (190/1): The attribute "LEFTMARGIN" is not allowed for the tag <BODY>.
Warning (190/1): The attribute "TOPMARGIN" is not allowed for the tag <BODY>.
Error (190/1): The attribute "rightmargin" is not part of HTML.
Error (190/1): The attribute "bottommargin" is not part of HTML.
Error (190/1): In the tag <BODY> the attribute "MARGINWIDTH" is not allowed.
Error (190/1): In the tag <BODY> the attribute "MARGINHEIGHT" is not allowed.
Error (190/1): The attribute "onbeforeunload" is not part of HTML.
Warning (205/5): The attribute "BACKGROUND" is not allowed for the tag <TD>.
Warning (206/5): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (206/5): The attribute "BACKGROUND" is not allowed for the tag <TD>.
Warning (213/5): The attribute "BACKGROUND" is not allowed for the tag <TD>.
Warning (227/5): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (238/1): The attribute "NAME" is not allowed for the tag <FORM>.
Warning (255/36): The attribute "NAME" is not allowed for the tag <IMG>.
Error (256/11): In the tag <DIV> the attribute "WIDTH" is not allowed.
Error (265/5): Tags or text are not allowed here. The tag <TR> is missing.
Error (265/5): Tags or text are not allowed here. The tag <TD> is missing.
Warning (268/22): The attribute "NAME" is not allowed for the tag <IMG>.
Warning (269/7): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (274/7): The attribute "WRAP" is not allowed for the tag <TEXTAREA>.
Error (274/7): In tag <TEXTAREA> the value "soft" is not valid for attribute "WRAP".
Warning (290/13): The attribute "NAME" is not allowed for the tag <IMG>.
Error (297/13): In the tag <TD> the attribute "BORDER" is not allowed.
Error (297/13): In the tag <TD> the attribute "HSPACE" is not allowed.
Error (297/13): In the tag <TD> the attribute "VSPACE" is not allowed.
Error (298/13): In the tag <TD> the attribute "BORDER" is not allowed.
Error (298/13): In the tag <TD> the attribute "HSPACE" is not allowed.
Error (298/13): In the tag <TD> the attribute "VSPACE" is not allowed.
Warning (298/13): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Error (311/13): In the tag <TD> the attribute "BORDER" is not allowed.
Error (311/13): In the tag <TD> the attribute "HSPACE" is not allowed.
Error (311/13): In the tag <TD> the attribute "VSPACE" is not allowed.
Error (376/5): The attribute "vvalign" is not part of HTML.
Warning (377/36): The attribute "NAME" is not allowed for the tag <IMG>.
Warning (378/7): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Error (391/1): Invalid characters in tag or attributes.
Error (391/1): The attribute "/" is not part of HTML.
Warning (402/36): The attribute "NAME" is not allowed for the tag <IMG>.
Warning (406/36): The attribute "NAME" is not allowed for the tag <IMG>.

No comments: