Paragraphs

Use the p element to create a simple paragraph.

Notes

  • The p element can contain a mixture of text and any general inline elements.

  • The p element can occur in any general block context, including inside pages, sections, and certain block elements.

  • The style attribute takes a space-separated list of style hints. Processing tools should adjust their behavior according to those style hints they understand.

  • The p element can have attributes from external namespaces. See External Namespaces for more information on external-namespace attributes.

Examples

Create a simple paragraph:

<p>The most basic block-level element in Mallard is the <code>p</code>
element. The <code>p</code> element creates a paragraph in the formatted
output.</p>

The most basic block-level element in Mallard is the p element. The p element creates a paragraph in the formatted output.

Processing Expectations

Paragraphs are displayed as block elements, with their child elements interpreted as inline elements. In on-screen media, paragraphs generally have padding above and below them to separate them from the surrounding block content. In print media, the first line of each paragraph has traditionally been indented.

Comparison to Other Formats

DocBook contains two elements for creating paragraphs: para and simpara. The p element in Mallard is similar to the simpara element in DocBook in that it does not allow block content.

The p element in Mallard is similar to the p element in DITA, except that block content may not be mixed into paragraphs in Mallard.

Schema

The formal definition of the Mallard language is maintained in RELAX NG Compact Syntax in code blocks within this specification. This is the formal definition for the p element. The namespace declarations for this definition are on the page Pages.

mal_block_p = element p {
  mal_block_p_attr,
  mal_block_p_inline
}
mal_block_p_attr = (
  attribute style { xsd:NMTOKENS } ?,
  mal_block_attr,
  mal_attr_external *
)
mal_block_p_inline = mal_inline
© 2008-2011 Shaun McCance
cc-by-sa 3.0 (us)

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

As a special exception, the copyright holders give you permission to copy, modify, and distribute the example code contained in this document under the terms of your choosing, without restriction.

Powered by
Mallard
Hosted by Syllogist