in reply to HTML::TreeBuilder dropping end tags

The <li> and <p> tags are historically and traditionally special, in that they represent the beginning of a span but do not require any special closing tag. The next tag that closes the list or starts another item will be the implied end of the span.

I think they're currently specified by W3C to require them, since I'd expect things would trend toward strict SGML/XML compliance. However, any browser worth anything will have to put up with this historical usage. Be flexible in what you accept, and strict in what you produce, as the saying goes.

(Oh, and lose the extra "o" in loose. If your belt is loose, you might lose your pants.)

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re^2: HTML::TreeBuilder dropping end tags
by Joost (Canon) on Jul 13, 2005 at 18:33 UTC
Re^2: HTML::TreeBuilder dropping end tags
by admiral_grinder (Pilgrim) on Jul 13, 2005 at 19:45 UTC
    in this case I am using XHTML (generated from some XML data), and setting options to preserve the XHTML data as much as possible. I suck at spelling too, the backspace key gets a really healthy workout.