RE: Minimized P valid XHTML?

Osmo Saarikumpu wrote:

> Is the following document then perfectly valid, as the validator says, or
is 
> it invalid, as it would seem to me (according to my understanding of the
the 
> wording of the Reformulation of HTML 4 in XML 1.0):
[snip]
> <h1 />Hello world!
> <q />Hello again!
> <p />Have a nice day!

That's equivalent to:

| <h1></h1>Hello world!
| <q></q>Hello again!
| <p></p>Have a nice day!

Transitional will allow the latter, since "naked" text is allowed.  Strict
will not, because text cannot be the direct child of <body>.

I'm not sure if it's legit to use the shorthand <br />-style closure on
non-empty elements, although I'm loathe to argue with the validator.  I am
pretty sure, though, that if it is legit, it doesn't mean what you intend.

Thanasis Kinias
Information Dissemination Team, Information Technology
Arizona State University
Tempe, Ariz., U.S.A.

Qui nos rodunt confundantur
et cum iustis non scribantur.

Received on Thursday, 29 March 2001 14:01:34 UTC