Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Ensuring HTML is "balanced"

by Anonymous Monk
on Mar 25, 2008 at 19:03 UTC ( [id://676205]=note: print w/replies, xml ) Need Help??


in reply to Re: Ensuring HTML is "balanced"
in thread Ensuring HTML is "balanced"

...So since the cleaned up HTML in fact has a broken p tag, are we free to assume that the Lint report *and* Treebuilder handle P tags in an amusing manner?

Replies are listed 'Best First'.
Re^3: Ensuring HTML is "balanced"
by GrandFather (Saint) on Mar 26, 2008 at 01:45 UTC

    Actually HTML doesn't require that some tags (including p tags) be closed. In particular the HTML 4.01 specification in section 9.3.1 says:

    Paragraphs: the P element
    Start tag: required, End tag: optional

    so strictly speaking the p tag is not broken.


    Perl is environmentally friendly - it saves trees
Re^3: Ensuring HTML is "balanced"
by ww (Archbishop) on Mar 26, 2008 at 00:47 UTC
    This is a common misconception (and one which I think reflects what the standard *SHOULD* be). Even though the close </p> tag is mandatory for certain other standards, </p> is optional in html 4.01, per http://www.w3.org/TR/html401/struct/text.htm and other w3c references:
    9.3.1 Paragraphs: the P element
    ...
    Start tag: required, End tag: optional

    Whether or not this stands in the forthcoming html 5.0 standard is unknown.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://676205]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (None)
    As of 2024-04-25 04:04 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found