develooper Front page | perl.beginners | Postings from April 2002

Re: HTML whine

Thread Previous | Thread Next
Tagore Smith
April 2, 2002 17:31
Re: HTML whine
Message ID:
Jonathan E. Paton wrote:

> Closing HTML tags is part of the specification, i.e.
> not optional for syntactically correct HTML.
> Such HTML only works with most browsers due to the
> proliferation of badly coded HTML.  If it wasn't
> for that, then browsers wouldn't have such a hard
> time parsing HTML (and would therefore be faster).
> Alas, web designers cut back on HTML tags to improve
> the download times - a mixed blessing.

Not to nitpick (but I'm going to anyway :) ), but closing some tags (like p)
is optional in all versions of HTML based on SGML. SGML allows for end tag
minimization. Closing tags is mandatory in XHTML- xml does not allow for end
tag minimization (in fact even empty tags, like img and br, must be closed).
I don't know off the top of my head if the spec allows end tag minimization
for option elements, but I agree that it is good form to close the tags.
Since recent web servers and browsers increasingly use compression, and
repeated elements compress well, bandwidth is becoming less of an issue.

Tagore Smith

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About