<P ID="p1">The P element acts as container for the text between the start tag <P>*1 and end tag </P>. You don't need to give the end tag as it is implied by the context, e.g. the following <P> tag. <P ID="p2">If you wish, you may think of the <P> tag as a paragraph separator. This works since HTML+ formally doesn't require you to wrap text up as paragraphs.This would be rendered as:
The P element acts as a container for the text between the start tag <P> and the end tag </P>. You don't need to give the end tag as it is implied by the context, e.g. the following <P> tag.
If you wish, you may think of the <P> tag as a paragraph separator. This works since HTML+ formally doesn't require you to wrap text up as paragraphs.
The following samples of HTML+ all produce exactly the same results when displayed:
<H1>Different ways of using the P element</H1> <P>The first piece of text</P><P>The second piece</P> <H1>Different ways of using the P element</H1> <P>The first piece of text<P>The second piece <H1>Different ways of using the P element</H1> The first piece of text<P>The second pieceThey all produce:
In some situations you will want to preserve the original line breaks and spacing, for this you should use the LIT or PRE elements, these are described in a later section. You can force line breaks in normal paragraph text with the <BR> element, but the browser may wrap lines arbitrarily at window margins prior to reaching the <BR> element.
The ALIGN attribute can be used to center a paragraph, e.g. <P ALIGN=center>. Other possibilities are ALIGN=left (the default), ALIGN=right, ALIGN=justify and ALIGN=indent. This attribute is a hint and may be ignored by some browsers. Note that when using explicit line breaks (see Section 5.12) you may wish to switch off word wrap with WRAP=OFF.
Browsers, when parsing paragraphs, can choose to simply treat the <P> tag as denoting a paragraph break. If the paragraph style includes a blank line between paragraphs, then additional care is needed after headers and other major elements*2 to avoid inserting an unwanted blank line, e.g. when a <P> tag directly follows a header. This ability to perceive <P> as a paragraph break provides for continuity with HTML, and allows authors to graduate to treating it as a container in their own time.