1
<page xmlns="http://projectmallard.org/1.0/"
6
<revision version="0.1" date="2009-05-28" status="review"/>
9
<name>Shaun McCance</name>
10
<email>shaunm@gnome.org</email>
13
<year>2008-2009</year>
14
<name>Shaun McCance</name>
17
<include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude" />
19
<desc>Create a simple paragraph of text.</desc>
22
<title>Paragraphs</title>
24
<synopsis><code mime="application/relax-ng-compact-syntax">
25
mal_block_p = element p {
26
attribute style { xsd:NMTOKENS } ?,
27
attribute * - (mal:* | local:*) { text } *,
29
<link xref="mal_inline">mal_inline</link>
33
<p>The most basic block-level element in Mallard is the <code>p</code>
34
element. The <code>p</code> element creates a paragraph in the formatted
42
<item><p>The <code>p</code> element can contain a mixture of text and
43
any <link xref="mal_inline">general inline elements</link>.</p></item>
45
<item><p>The <code>p</code> element can occur in any
46
general block context, including inside
47
<link xref="mal_page">pages</link>, <link xref="mal_section">sections</link>,
48
and certain <link xref="mal_block">block elements</link>.</p></item>
50
<item><p>The <code>style</code> attribute takes a space-separated list of
51
style hints. Processing tools should adjust their behavior according to
52
those style hints they understand.</p></item>
54
<item><p>The <code>p</code> element can have attributes from external
55
namespaces. See <link xref="mal_external"/> for more information
56
on external-namespace attributes.</p></item>
62
<!-- BEGIN examples -->
63
<section id="examples">
64
<title>Examples</title>
66
<p>Create a simple paragraph:</p>
70
<p>The most basic block-level element in Mallard is the <code>p</code>
71
element. The <code>p</code> element creates a paragraph in the formatted
73
<p>The most basic block-level element in Mallard is the <code>p</code>
74
element. The <code>p</code> element creates a paragraph in the formatted
81
<!-- BEGIN processing -->
82
<section id="processing">
83
<title>Processing Expectations</title>
84
<p>Paragraphs are displayed as block elements, with their child elements
85
interpreted as inline elements. In on-screen media, paragraphs generally
86
have padding above and below them to separate them from the surrounding
87
block content. In print media, the first line of each paragraph has
88
traditionally been indented.</p>
90
<!-- END processing -->
93
<!-- BEGIN docbook -->
94
<section id="docbook">
95
<title>Comparison to DocBook</title>
96
<p>The <code>p</code> element in Mallard appears to be equivalent to to the
97
<code href="http://www.docbook.org/tdg/en/html/para.html">para</code> element
98
in DocBook. While both elements create a paragraph in the formatted output,
99
the <code>p</code> element in Mallard is actually much more restrictive, as it
100
does not permit nested block content. In this regard, it is actaully similar
101
to the <code href="http://www.docbook.org/tdg/en/html/simpara.html">simpara</code>
102
element in DocBook.</p>