Re: Closing tags

Martian ([email protected])
Tue, 11 Apr 1995 23:37:32 +0500


Once upon a time you, Trond Are Undem, wrote:
-->
--> On Tue, 4 Apr 1995, Jeffrey Hobbs wrote:
-->
--> > >What's right to use according to the standard and standards to come of
--> > >the following:
--> > >
--> > > <P></P>, <LI></LI>, <DT></DT>, <DD></DD>
--> > >
--> > >or without closing tags
--> >
--> > Browsers should handle these with or without closing tags, but editors
--> > _should_ generate perfect HTML, meaning they should write it out with
--> > close tags.
-->
--> I see ... thanks for your help :)
-->

Well, not having the closing tags for <P>, <LI> etc *is* perfect HTML.
>From the DTD:

<!ELEMENT P - O (%text)+>
<!ELEMENT DT - O (%text)+>
<!ELEMENT DD - O %flow;>
<!ELEMENT LI - O %flow; -- list item -->

The `-' after the element name indicates the opening tag is required,
the `O' in the second field after the name indicates the closing tag
is optional. Hence, using <P>, <LI>, <DT> and <DD> without </P>,
</LI>, </DT> and </DD> *is* perfect HTML.

Abigail