Paragraph

The Paragraph is a basic rhetorical and visual structural unit of prose texts.

Most (probably all) markup languages have a relevant element, although the precise definition and syntax for the element can vary, in some cases significantly.

Print
In print, paragraphs begin with a new line and are usually indented. Exceptions include the first paragraph after section headings (which are commonly not indented in printed sources) and electronic documents (in which paragraphs are commonly separated by a blank line rather than indented).

In addition to running text, paragraphs may contain other material such as block quotations, tables, figures, images, and the like. These commonly begin on a new line and often are indented or centered. If the paragraph resumes after this inserted material, the continuation begins on a new line and is never indented (Example).

The insertion of elements such as block quotations, tables, and the like are the most significant difficulty likely to be encountered in a structural encoding of paragraphs. Such insertions are treated very differently in several common markup languages.

Other paragraph-like structural units include items in a list and lines and stanzas of verse. Depending on the markup language, these may be encoded using a paragraph element or some other more specific element.

Manuscripts
Paragraphs in the typographical sense of a "block of text" are less commonly found in manuscripts, though they do occur, often preceded by a pilcrow-like mark (¶).

Paragraphs in the rhetorical sense, however, are ubiquitous. They may be marked off as sections, chapters, books, or treated as items in a list.

Structural encoding
Most structural languages use an element called,  , or the like to encode paragraphs. The main differences involve how they treat paragraph-internal lists, tables, figures, and block quotations.

(X)HTML
In strict (X)HTML, paragraphs are encoded using the following structural element:

&lt;p&gt;: Paragraph

Other elements used to encode special types of paragraphs and paragraph-like constructions are

&lt;blockquote&gt;: Block quotation &lt;pre&gt;: Preformatted text &lt;ol&gt;: Ordered (numbered) list &lt;ul&gt;: Unordered (bulleted) list &lt;li&gt;: List item

Line breaks can be forced using

&lt;br/&gt;: Line break

Other block-type elements

&lt;h1&gt;: First level heading &lt;h2&gt;: Second level heading &lt;h3&gt;: Third level heading &lt;h4&gt;: Fourth level heading &lt;h5&gt;: Fifth level heading &lt;h6&gt;: Sixth level heading &lt;table&gt;: Table &lt;tr&gt;: Table row

In (X)HTML  is a block-level element. This means it cannot contain other block-level elements such as,  , or   through. An important result of this restriction is that complex paragraphs involving internal block quotations and subsequent text cannot be encoded as a single logical paragraph. This contrasts particularly with the equivalent element in TEI XML. Transformations from strictly encoded TEI paragraphs to XHTML paragraphs, therefore, can be quite complicated.

Most visual commercial browsers render paragraphs by default as right-justified blocks separated from preceding and following text by a blank line. The appearance of this and most other elements can also be controlled by external (e.g. CSS stylesheets. See below.

TEI
In TEI XML (P4), paragraphs most commonly are encoded using the following structural element:

&lt;p&gt;: Paragraph

Line breaks (which should not be used for dividing paragraphs) are encoded using

&lt;lb&gt;: Line break

In addition to these elements, TEI also has a number of elements for more specialised (or abstract) paragraph-like constructions. These fall into two main classes:


 * 1) Elements that cannot be found within paragraphs
 * 2) Elements that can be found instead of or within paragraphs.

Elements that cannot be found within paragraphs
The following is a partial list of elements that can be used instead of  to encode paragraph-like structures, but may not occur withing  :

&lt;ab&gt;: Anonymous block &lt;argument&gt;: Argument or abstract &lt;byline&gt;: Byline &lt;epigraph&gt;: Epigraph &lt;head&gt;: Head (e.g. section title) &lt;l&gt;: Line (verse) &lt;lg&gt;: Line group (e.g. stanza) &lt;sp&gt;: Speech (e.g. in play) lt;witList&gt;: Witness list (textual apparatus)

Elements that can be found instead of or within paragraphs
The following is a partial list of elements that may be used either instead of or within  to encode paragraph-like structures:

&lt;bibl&gt;: Bibliographic item &lt;biblFull&gt;: Complete bibliographic item &lt;biblStruct&gt;: Structured bibliographic item &lt;castList&gt;: Cast list &lt;label&gt;: Label &lt;item&gt;: Item (in a list) &lt;row&gt;: Row (in a table) &lt;list&gt;: List &lt;listBibl&gt;: Bibliographic List &lt;note&gt;: Label &lt;table&gt;: Label &lt;q&gt;: Quotation &lt;quote&gt;: Quotation

In TEI, &lt;p&gt; is a | "chunk"-level element. This means it can contain | "phrase"- and "inter"- level elements, including elements for structures like block quotations or long code fragements that cannot be included in the equivalent XHTML element. Transformations from strictly encoded TEI paragraphs to XHTML paragraphs, therefore, can be quite complicated.

Most commercial browsers do not have a default stylesheet for this or any other TEI element (although they may render it as the XHTML equivalent). Its display characteristics, therefore, must be controlled by stylesheets, either directly (i.e. using a formatting style language such as CSS or XSL-FO or indirectly, after conversion to XHTML for display.

CSS
Several CSS properties control the appearance of paragraph-like elements:


 * 
 * 
 * 
 * 
 * 

is used to control whether the element is displayed as a block, in-line, etc.

The relevant value for most paragraphs is

block : places a hard return before and after element

Other permissible values include

inline : displays text without breaks before or after list : displays text as indented block none : prevents element from displaying at all

is the default value for XHTML  in most commercial browsers.

controls justification and alignment

Relevant values for paragraphs are

left : aligns (justifies) text down the left hand margin; right margin is ragged right : aligns (justifies) text down the right hand margin; left margin is ragged center : centers text down the middle of the display area; both margins are ragged justify : aligns text down both margins except for in the last line, which is left justified. Neither margin is ragged.

is the default value for XHTML  in most commercial browsers.

controls indentation.

This property takes a relative or absolute value (e.g. 3em; 10%; 12pt). Positive values 'indent' the first line (i.e. move it to the right); negative values create a 'hanging indent' (i.e. move the first line into the left margin).

or  is the default value for XHTML   in most commercial browsers.

(esp.,  ) controls the space between adjacent elements.

This property takes a relative or absolute value (e.g. 3em; 10%; 12pt). It is important to remember that  controls the distance between adjacent elements or between the edge of the display area and an element, not the distance between individual lines within an element (see ).1

is the default value for  and   for   in most commercial XHTML browsers (i.e. equivalent to an extra line above and below).

controls the distance between lines within an element.

This property takes an absolute or relative length (e.g. 1.2 em; 12 pt), multiple of the font size (e.g 1.2 [= 1.2 × the base font size]), or percentage of the font-size (e.g. 120%). In each case, these are minimum values: if the element contains material that is taller than the space provided, the line height will be adjusted to fit.

The default value for  for   in most commercial XHTML browsers is probabably between   to   (i.e. equivalent to 1.0 to 1.2 times the base font size).

Example
The following example formats an XHTML  element to display in a manner similar to an indented print paragraph:

p { display: block; text-align: justify; text-indent: 1em; margin-top: 0; margin-bottom: 0; line-height: 1.2 }

XSLT
There is no relevant XSLT category.

XSL-FO
(unknown)

LaTeX
(unknown)