Re: Re: Closing tags

Martian (
Sat, 29 Apr 1995 03:57:03 +0500

Once upon a time you, David R. Rahbany *NOT AUTHENTICATED*, wrote:
++ On Tue, 11 Apr 1995 23:40:41 +0500 Martian <> wrote:
++ >
++ >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
++ Please excuse my ignorance, but I'd like clarification
++ on the "<P>" element. Does this tag denote an _end_ of
++ paragraph mark or a _begining/new_ paragraph mark? In
++ other words, which of the following should appear in a
++ proper HTML document?
++ <P>This is a paragraph.
++ or
++ This is a paragraph<P>

As can be seen from the DTD the former. The <p> element acts as a
*container*, thus <p>text</p>. It is just that the closing tag is
optional. Long ago, before there was a DTD of HTML, <p> acted as a
separator, but that is no longer true.

This is the first paragraph
<p align = center>
This is the second paragraph

will center the second paragraph, not the first.