Re: Closing tags

Martian (abigail@mars.ic.iaf.nl)
Sat, 29 Apr 1995 06:54:40 +0200 (MET DST)


Message-Id: <m0s54YD-0002KNC@mars.ic.iaf.nl>
From: abigail@mars.ic.iaf.nl (Martian)
Subject: Re: Re: Closing tags
To: drahbany@ctea.com
Date: Sat, 29 Apr 1995 06:54:40 +0200 (MET DST)
Cc: www-html@www10.w3.org
In-Reply-To: <ECS.9504121014.D@dhp66462.ctea.com.ctea.com> from "David R. Rahbany *NOT AUTHENTICATED*" at Apr 12, 95 01:21:42 pm

Once upon a time you, David R. Rahbany *NOT AUTHENTICATED*, wrote:
++ 
++ On Tue, 11 Apr 1995 23:40:41 +0500  Martian <abigail@mars.ic.iaf.nl>   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.


Abigail