On Wed, 20 Feb 2002, Emil Mikulic wrote:

> And, on certain browsers, in conjunction with certain [mis]uses of
> tables and whatnot, the presence of a DOCTYPE line can break an
> otherwise good layout.

DOCTYPE is just a guide for browser (or spider etc) telling what to expect
from the HTML. Depending on implementation, one could ignore all elements
which don't belong to the DOCTYPE specified thus creating situation like
you wrote.

> Most browsers >really don't care< how badly malformed the markup
> is.  In most cases, the opening <html> and <body> tags are
> optional.

Most browsers, heh. I guess you refer to Internet Explorer, which would be
the most used browser. :) Though I encourage you to test other
implementations as well. IE isn't available on all platforms where Java
is.

Yes, current spec (HTML 4.01) says HTML, HEAD and BODY are optional. But
if you want to be compatible to those browsers which might not parse
Content-Type server header properly, you should include them. Really only
thing what is mandatory by spec is TITLE tag. For historic reference, I
looked at HTML 2.0 and it also has TITLE marked as required element.

On further note, I don't want this to turn into a flamewar. It's
quite enough to read nitpicking when submitting IMHO valid bug reports.

-tumu



_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to