in reply to Re: HTML::TreeBuilder dropping end tags
in thread HTML::TreeBuilder dropping end tags

End tags for P and the various "list element" tags are only required in XHTML. They're optional in HTML.

See the specs for <p> in HTML 4.01:

9.3.1 Paragraphs: the P element

<!ELEMENT P - O (%inline;)*            -- paragraph -->
<!ATTLIST P
  %attrs;                              -- %coreattrs, %i18n, %events --
  >

Start tag: required, End tag: optional

update: see http://www.w3.org/TR/html401/index/elements.html for the index of all HTML tags.

  • Comment on Re^2: HTML::TreeBuilder dropping end tags