summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
Diffstat (limited to 'docutils/test')
-rw-r--r--docutils/test/functional/expected/standalone_rst_html5.html486
-rw-r--r--docutils/test/functional/input/html5-text-level-tags.txt227
-rw-r--r--docutils/test/functional/input/standalone_rst_html5.txt2
3 files changed, 582 insertions, 133 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_html5.html b/docutils/test/functional/expected/standalone_rst_html5.html
index 9e8728461..61a2b3bcc 100644
--- a/docutils/test/functional/expected/standalone_rst_html5.html
+++ b/docutils/test/functional/expected/standalone_rst_html5.html
@@ -86,92 +86,93 @@ They are transformed from section titles after parsing. -->
<div class="contents topic" id="table-of-contents">
<p class="topic-title">Table of Contents</p>
<ul class="auto-toc simple">
-<li><p><a class="reference internal" href="#structural-elements" id="id38"><span class="sectnum">1</span> Structural Elements</a></p>
+<li><p><a class="reference internal" href="#structural-elements" id="id50"><span class="sectnum">1</span> Structural Elements</a></p>
<ul class="auto-toc">
-<li><p><a class="reference internal" href="#section-title" id="id39"><span class="sectnum">1.1</span> Section Title</a></p></li>
-<li><p><a class="reference internal" href="#empty-section" id="id40"><span class="sectnum">1.2</span> Empty Section</a></p></li>
-<li><p><a class="reference internal" href="#transitions" id="id41"><span class="sectnum">1.3</span> Transitions</a></p></li>
+<li><p><a class="reference internal" href="#section-title" id="id51"><span class="sectnum">1.1</span> Section Title</a></p></li>
+<li><p><a class="reference internal" href="#empty-section" id="id52"><span class="sectnum">1.2</span> Empty Section</a></p></li>
+<li><p><a class="reference internal" href="#transitions" id="id53"><span class="sectnum">1.3</span> Transitions</a></p></li>
</ul>
</li>
-<li><p><a class="reference internal" href="#body-elements" id="id42"><span class="sectnum">2</span> Body Elements</a></p>
+<li><p><a class="reference internal" href="#body-elements" id="id54"><span class="sectnum">2</span> Body Elements</a></p>
<ul class="auto-toc">
-<li><p><a class="reference internal" href="#paragraphs" id="id43"><span class="sectnum">2.1</span> Paragraphs</a></p>
+<li><p><a class="reference internal" href="#paragraphs" id="id55"><span class="sectnum">2.1</span> Paragraphs</a></p>
<ul class="auto-toc">
-<li><p><a class="reference internal" href="#inline-markup" id="id44"><span class="sectnum">2.1.1</span> Inline Markup</a></p></li>
+<li><p><a class="reference internal" href="#inline-markup" id="id56"><span class="sectnum">2.1.1</span> Inline Markup</a></p></li>
</ul>
</li>
-<li><p><a class="reference internal" href="#bullet-lists" id="id45"><span class="sectnum">2.2</span> Bullet Lists</a></p></li>
-<li><p><a class="reference internal" href="#enumerated-lists" id="id46"><span class="sectnum">2.3</span> Enumerated Lists</a></p></li>
-<li><p><a class="reference internal" href="#definition-lists" id="id47"><span class="sectnum">2.4</span> Definition Lists</a></p></li>
-<li><p><a class="reference internal" href="#field-lists" id="id48"><span class="sectnum">2.5</span> Field Lists</a></p></li>
-<li><p><a class="reference internal" href="#option-lists" id="id49"><span class="sectnum">2.6</span> Option Lists</a></p></li>
-<li><p><a class="reference internal" href="#literal-blocks" id="id50"><span class="sectnum">2.7</span> Literal Blocks</a></p></li>
-<li><p><a class="reference internal" href="#line-blocks" id="id51"><span class="sectnum">2.8</span> Line Blocks</a></p></li>
-<li><p><a class="reference internal" href="#block-quotes" id="id52"><span class="sectnum">2.9</span> Block Quotes</a></p></li>
-<li><p><a class="reference internal" href="#doctest-blocks" id="id53"><span class="sectnum">2.10</span> Doctest Blocks</a></p></li>
-<li><p><a class="reference internal" href="#footnotes" id="id54"><span class="sectnum">2.11</span> Footnotes</a></p></li>
-<li><p><a class="reference internal" href="#citations" id="id55"><span class="sectnum">2.12</span> Citations</a></p></li>
-<li><p><a class="reference internal" href="#targets" id="id56"><span class="sectnum">2.13</span> Targets</a></p>
+<li><p><a class="reference internal" href="#bullet-lists" id="id57"><span class="sectnum">2.2</span> Bullet Lists</a></p></li>
+<li><p><a class="reference internal" href="#enumerated-lists" id="id58"><span class="sectnum">2.3</span> Enumerated Lists</a></p></li>
+<li><p><a class="reference internal" href="#definition-lists" id="id59"><span class="sectnum">2.4</span> Definition Lists</a></p></li>
+<li><p><a class="reference internal" href="#field-lists" id="id60"><span class="sectnum">2.5</span> Field Lists</a></p></li>
+<li><p><a class="reference internal" href="#option-lists" id="id61"><span class="sectnum">2.6</span> Option Lists</a></p></li>
+<li><p><a class="reference internal" href="#literal-blocks" id="id62"><span class="sectnum">2.7</span> Literal Blocks</a></p></li>
+<li><p><a class="reference internal" href="#line-blocks" id="id63"><span class="sectnum">2.8</span> Line Blocks</a></p></li>
+<li><p><a class="reference internal" href="#block-quotes" id="id64"><span class="sectnum">2.9</span> Block Quotes</a></p></li>
+<li><p><a class="reference internal" href="#doctest-blocks" id="id65"><span class="sectnum">2.10</span> Doctest Blocks</a></p></li>
+<li><p><a class="reference internal" href="#footnotes" id="id66"><span class="sectnum">2.11</span> Footnotes</a></p></li>
+<li><p><a class="reference internal" href="#citations" id="id67"><span class="sectnum">2.12</span> Citations</a></p></li>
+<li><p><a class="reference internal" href="#targets" id="id68"><span class="sectnum">2.13</span> Targets</a></p>
<ul class="auto-toc">
-<li><p><a class="reference internal" href="#duplicate-target-names" id="id57"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></p></li>
-<li><p><a class="reference internal" href="#id21" id="id58"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></p></li>
+<li><p><a class="reference internal" href="#duplicate-target-names" id="id69"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></p></li>
+<li><p><a class="reference internal" href="#id21" id="id70"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></p></li>
</ul>
</li>
-<li><p><a class="reference internal" href="#directives" id="id59"><span class="sectnum">2.14</span> Directives</a></p>
+<li><p><a class="reference internal" href="#directives" id="id71"><span class="sectnum">2.14</span> Directives</a></p>
<ul class="auto-toc">
-<li><p><a class="reference internal" href="#document-parts" id="id60"><span class="sectnum">2.14.1</span> Document Parts</a></p></li>
-<li><p><a class="reference internal" href="#images-and-figures" id="id61"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li>
-<li><p><a class="reference internal" href="#admonitions" id="id62"><span class="sectnum">2.14.3</span> Admonitions</a></p></li>
-<li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="id63"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></p></li>
-<li><p><a class="reference internal" href="#target-footnotes" id="id64"><span class="sectnum">2.14.5</span> Target Footnotes</a></p></li>
-<li><p><a class="reference internal" href="#replacement-text" id="id65"><span class="sectnum">2.14.6</span> Replacement Text</a></p></li>
-<li><p><a class="reference internal" href="#compound-paragraph" id="id66"><span class="sectnum">2.14.7</span> Compound Paragraph</a></p></li>
-<li><p><a class="reference internal" href="#parsed-literal-blocks" id="id67"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></p></li>
-<li><p><a class="reference internal" href="#code" id="id68"><span class="sectnum">2.14.9</span> Code</a></p></li>
+<li><p><a class="reference internal" href="#document-parts" id="id72"><span class="sectnum">2.14.1</span> Document Parts</a></p></li>
+<li><p><a class="reference internal" href="#images-and-figures" id="id73"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li>
+<li><p><a class="reference internal" href="#admonitions" id="id74"><span class="sectnum">2.14.3</span> Admonitions</a></p></li>
+<li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="id75"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></p></li>
+<li><p><a class="reference internal" href="#target-footnotes" id="id76"><span class="sectnum">2.14.5</span> Target Footnotes</a></p></li>
+<li><p><a class="reference internal" href="#replacement-text" id="id77"><span class="sectnum">2.14.6</span> Replacement Text</a></p></li>
+<li><p><a class="reference internal" href="#compound-paragraph" id="id78"><span class="sectnum">2.14.7</span> Compound Paragraph</a></p></li>
+<li><p><a class="reference internal" href="#parsed-literal-blocks" id="id79"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></p></li>
+<li><p><a class="reference internal" href="#code" id="id80"><span class="sectnum">2.14.9</span> Code</a></p></li>
</ul>
</li>
-<li><p><a class="reference internal" href="#substitution-definitions" id="id69"><span class="sectnum">2.15</span> Substitution Definitions</a></p></li>
-<li><p><a class="reference internal" href="#comments" id="id70"><span class="sectnum">2.16</span> Comments</a></p></li>
-<li><p><a class="reference internal" href="#raw-text" id="id71"><span class="sectnum">2.17</span> Raw text</a></p></li>
-<li><p><a class="reference internal" href="#container" id="id72"><span class="sectnum">2.18</span> Container</a></p></li>
-<li><p><a class="reference internal" href="#colspanning-tables" id="id73"><span class="sectnum">2.19</span> Colspanning tables</a></p></li>
-<li><p><a class="reference internal" href="#rowspanning-tables" id="id74"><span class="sectnum">2.20</span> Rowspanning tables</a></p></li>
-<li><p><a class="reference internal" href="#complex-tables" id="id75"><span class="sectnum">2.21</span> Complex tables</a></p></li>
-<li><p><a class="reference internal" href="#list-tables" id="id76"><span class="sectnum">2.22</span> List Tables</a></p></li>
-<li><p><a class="reference internal" href="#custom-roles" id="id77"><span class="sectnum">2.23</span> Custom Roles</a></p></li>
-<li><p><a class="reference internal" href="#svg-images" id="id78"><span class="sectnum">2.24</span> SVG Images</a></p></li>
-<li><p><a class="reference internal" href="#swf-images" id="id79"><span class="sectnum">2.25</span> SWF Images</a></p></li>
+<li><p><a class="reference internal" href="#substitution-definitions" id="id81"><span class="sectnum">2.15</span> Substitution Definitions</a></p></li>
+<li><p><a class="reference internal" href="#comments" id="id82"><span class="sectnum">2.16</span> Comments</a></p></li>
+<li><p><a class="reference internal" href="#raw-text" id="id83"><span class="sectnum">2.17</span> Raw text</a></p></li>
+<li><p><a class="reference internal" href="#container" id="id84"><span class="sectnum">2.18</span> Container</a></p></li>
+<li><p><a class="reference internal" href="#colspanning-tables" id="id85"><span class="sectnum">2.19</span> Colspanning tables</a></p></li>
+<li><p><a class="reference internal" href="#rowspanning-tables" id="id86"><span class="sectnum">2.20</span> Rowspanning tables</a></p></li>
+<li><p><a class="reference internal" href="#complex-tables" id="id87"><span class="sectnum">2.21</span> Complex tables</a></p></li>
+<li><p><a class="reference internal" href="#list-tables" id="id88"><span class="sectnum">2.22</span> List Tables</a></p></li>
+<li><p><a class="reference internal" href="#custom-roles" id="id89"><span class="sectnum">2.23</span> Custom Roles</a></p></li>
+<li><p><a class="reference internal" href="#svg-images" id="id90"><span class="sectnum">2.24</span> SVG Images</a></p></li>
+<li><p><a class="reference internal" href="#swf-images" id="id91"><span class="sectnum">2.25</span> SWF Images</a></p></li>
</ul>
</li>
-<li><p><a class="reference internal" href="#changes-to-the-html4css1-writer" id="id80"><span class="sectnum">3</span> Changes to the html4css1 writer</a></p>
+<li><p><a class="reference internal" href="#text-level-semantics" id="id92"><span class="sectnum">3</span> Text-level semantics</a></p></li>
+<li><p><a class="reference internal" href="#changes-to-the-html4css1-writer" id="id93"><span class="sectnum">4</span> Changes to the html4css1 writer</a></p>
<ul class="auto-toc">
-<li><p><a class="reference internal" href="#field-list-handling" id="id81"><span class="sectnum">3.1</span> Field list handling</a></p></li>
-<li><p><a class="reference internal" href="#styling-with-class-arguments" id="id82"><span class="sectnum">3.2</span> Styling with class arguments</a></p>
+<li><p><a class="reference internal" href="#field-list-handling" id="id94"><span class="sectnum">4.1</span> Field list handling</a></p></li>
+<li><p><a class="reference internal" href="#styling-with-class-arguments" id="id95"><span class="sectnum">4.2</span> Styling with class arguments</a></p>
<ul class="auto-toc">
-<li><p><a class="reference internal" href="#description-lists" id="id83"><span class="sectnum">3.2.1</span> Description lists</a></p></li>
-<li><p><a class="reference internal" href="#field-list-variants" id="id84"><span class="sectnum">3.2.2</span> Field list variants</a></p></li>
-<li><p><a class="reference internal" href="#table-variants" id="id85"><span class="sectnum">3.2.3</span> Table variants</a></p></li>
+<li><p><a class="reference internal" href="#description-lists" id="id96"><span class="sectnum">4.2.1</span> Description lists</a></p></li>
+<li><p><a class="reference internal" href="#field-list-variants" id="id97"><span class="sectnum">4.2.2</span> Field list variants</a></p></li>
+<li><p><a class="reference internal" href="#table-variants" id="id98"><span class="sectnum">4.2.3</span> Table variants</a></p></li>
</ul>
</li>
</ul>
</li>
-<li><p><a class="reference internal" href="#error-handling" id="id86"><span class="sectnum">4</span> Error Handling</a></p></li>
+<li><p><a class="reference internal" href="#error-handling" id="id99"><span class="sectnum">5</span> Error Handling</a></p></li>
</ul>
</div>
<div class="section" id="structural-elements">
-<h1><a class="toc-backref" href="#id38"><span class="sectnum">1</span> Structural Elements</a></h1>
+<h1><a class="toc-backref" href="#id50"><span class="sectnum">1</span> Structural Elements</a></h1>
<div class="section" id="section-title">
-<h2 class="with-subtitle"><a class="toc-backref" href="#id39"><span class="sectnum">1.1</span> Section Title</a></h2>
+<h2 class="with-subtitle"><a class="toc-backref" href="#id51"><span class="sectnum">1.1</span> Section Title</a></h2>
<p class="section-subtitle" id="section-subtitle">Section Subtitle</p>
<p>Lone subsections are converted to a section subtitle by a transform
activated with the <span class="docutils literal"><span class="pre">--section-subtitles</span></span> command line option or the
<span class="docutils literal"><span class="pre">sectsubtitle-xform</span></span> configuration value.</p>
</div>
<div class="section" id="empty-section">
-<h2><a class="toc-backref" href="#id40"><span class="sectnum">1.2</span> Empty Section</a></h2>
+<h2><a class="toc-backref" href="#id52"><span class="sectnum">1.2</span> Empty Section</a></h2>
</div>
<div class="section" id="transitions">
-<h2><a class="toc-backref" href="#id41"><span class="sectnum">1.3</span> Transitions</a></h2>
+<h2><a class="toc-backref" href="#id53"><span class="sectnum">1.3</span> Transitions</a></h2>
<p>Here's a transition:</p>
<hr class="docutils" />
<p>It divides the section. Transitions may also occur between sections:</p>
@@ -179,24 +180,24 @@ activated with the <span class="docutils literal"><span class="pre">--section-su
</div>
<hr class="docutils" />
<div class="section" id="body-elements">
-<h1><a class="toc-backref" href="#id42"><span class="sectnum">2</span> Body Elements</a></h1>
+<h1><a class="toc-backref" href="#id54"><span class="sectnum">2</span> Body Elements</a></h1>
<div class="section" id="paragraphs">
-<h2><a class="toc-backref" href="#id43"><span class="sectnum">2.1</span> Paragraphs</a></h2>
+<h2><a class="toc-backref" href="#id55"><span class="sectnum">2.1</span> Paragraphs</a></h2>
<p>A paragraph.</p>
<div class="section" id="inline-markup">
-<h3><a class="toc-backref" href="#id44"><span class="sectnum">2.1.1</span> Inline Markup</a></h3>
+<h3><a class="toc-backref" href="#id56"><span class="sectnum">2.1.1</span> Inline Markup</a></h3>
<p>Paragraphs contain text and may contain inline markup: <em>emphasis</em>,
<strong>strong emphasis</strong>, <span class="docutils literal">inline literals</span>, standalone hyperlinks
-(<a class="reference external" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#id25" id="id26">5</a>), internal
+(<a class="reference external" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#id33" id="id34">7</a>), internal
cross-references (<a class="reference internal" href="#example">example</a>), external hyperlinks with embedded URIs
(<a class="reference external" href="http://www.python.org">Python web site</a>), <a class="reference external" href="http://www.python.org/">anonymous hyperlink
-references</a> <a class="footnote-reference brackets" href="#id25" id="id35">5</a> (<a class="reference external" href="http://docutils.sourceforge.net/">a second reference</a> <a class="footnote-reference brackets" href="#id36" id="id37">9</a>), footnote references (manually
+references</a> <a class="footnote-reference brackets" href="#id33" id="id45">7</a> (<a class="reference external" href="http://docutils.sourceforge.net/">a second reference</a> <a class="footnote-reference brackets" href="#id46" id="id47">12</a>), footnote references (manually
numbered <a class="footnote-reference brackets" href="#id8" id="id1">1</a>, anonymous auto-numbered <a class="footnote-reference brackets" href="#id12" id="id2">3</a>, labeled auto-numbered
<a class="footnote-reference brackets" href="#label" id="id3">2</a>, or symbolic <a class="footnote-reference brackets" href="#id13" id="id4">*</a>), citation references (<a class="citation-reference" href="#cit2002" id="id5">[CIT2002]</a>),
substitution references (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" /> &amp;
a <em>trimmed heart</em> <span class="docutils literal">(U+2665):</span>♥), and <span class="target" id="inline-hyperlink-targets">inline hyperlink targets</span>
(see <a class="reference internal" href="#targets">Targets</a> below for a reference back to here). Character-level
-inline markup is also possible (although exceedingly ugly!) in <em>re</em><span class="docutils literal">Structured</span><em>Text</em>. Problems are indicated by <a href="#id23"><span class="problematic" id="id24">|problematic|</span></a> text
+inline markup is also possible (although exceedingly ugly!) in <em>re</em><span class="docutils literal">Structured</span><em>Text</em>. Problems are indicated by <a href="#id31"><span class="problematic" id="id32">|problematic|</span></a> text
(generated by processing errors; this one is intentional). Here is a
reference to the <a class="reference internal" href="#doctitle">doctitle</a> and the <a class="reference internal" href="#subtitle">subtitle</a>.</p>
<p>The default role for interpreted text is <cite>Title Reference</cite>. Here are
@@ -213,7 +214,7 @@ live link to PEP 258 here.</p>
</div>
</div>
<div class="section" id="bullet-lists">
-<h2><a class="toc-backref" href="#id45"><span class="sectnum">2.2</span> Bullet Lists</a></h2>
+<h2><a class="toc-backref" href="#id57"><span class="sectnum">2.2</span> Bullet Lists</a></h2>
<ul>
<li><p>A bullet list</p>
<ul class="simple">
@@ -240,7 +241,7 @@ live link to PEP 258 here.</p>
</ul>
</div>
<div class="section" id="enumerated-lists">
-<h2><a class="toc-backref" href="#id46"><span class="sectnum">2.3</span> Enumerated Lists</a></h2>
+<h2><a class="toc-backref" href="#id58"><span class="sectnum">2.3</span> Enumerated Lists</a></h2>
<ol class="arabic">
<li><p>Arabic numerals.</p>
<ol class="loweralpha simple">
@@ -276,7 +277,7 @@ live link to PEP 258 here.</p>
</ol>
</div>
<div class="section" id="definition-lists">
-<h2><a class="toc-backref" href="#id47"><span class="sectnum">2.4</span> Definition Lists</a></h2>
+<h2><a class="toc-backref" href="#id59"><span class="sectnum">2.4</span> Definition Lists</a></h2>
<dl>
<dt>Term</dt>
<dd><p>Definition</p>
@@ -294,7 +295,7 @@ live link to PEP 258 here.</p>
</dl>
</div>
<div class="section" id="field-lists">
-<h2><a class="toc-backref" href="#id48"><span class="sectnum">2.5</span> Field Lists</a></h2>
+<h2><a class="toc-backref" href="#id60"><span class="sectnum">2.5</span> Field Lists</a></h2>
<dl class="field-list">
<dt>what</dt>
<dd><p>Field lists map field names to field bodies, like database
@@ -314,7 +315,7 @@ doesn't get stripped away.)</p>
</dl>
</div>
<div class="section" id="option-lists">
-<h2><a class="toc-backref" href="#id49"><span class="sectnum">2.6</span> Option Lists</a></h2>
+<h2><a class="toc-backref" href="#id61"><span class="sectnum">2.6</span> Option Lists</a></h2>
<p>For listing command-line options:</p>
<dl class="option-list">
<dt><kbd><span class="option">-a</span></kbd></dt>
@@ -353,7 +354,7 @@ regardless of where it starts.</p>
description.</p>
</div>
<div class="section" id="literal-blocks">
-<h2><a class="toc-backref" href="#id50"><span class="sectnum">2.7</span> Literal Blocks</a></h2>
+<h2><a class="toc-backref" href="#id62"><span class="sectnum">2.7</span> Literal Blocks</a></h2>
<p>Literal blocks are indicated with a double-colon (&quot;::&quot;) at the end of
the preceding paragraph (over there <span class="docutils literal"><span class="pre">--&gt;</span></span>). They can be indented:</p>
<pre class="literal-block">if literal_block:
@@ -366,7 +367,7 @@ the preceding paragraph (over there <span class="docutils literal"><span class="
&gt; Why didn't I think of that?</pre>
</div>
<div class="section" id="line-blocks">
-<h2><a class="toc-backref" href="#id51"><span class="sectnum">2.8</span> Line Blocks</a></h2>
+<h2><a class="toc-backref" href="#id63"><span class="sectnum">2.8</span> Line Blocks</a></h2>
<p>This section tests line blocks. Line blocks are body elements which
consist of lines and other line blocks. Nested line blocks cause
indentation.</p>
@@ -440,7 +441,7 @@ also be centre-aligned:</p>
</div>
</div>
<div class="section" id="block-quotes">
-<h2><a class="toc-backref" href="#id52"><span class="sectnum">2.9</span> Block Quotes</a></h2>
+<h2><a class="toc-backref" href="#id64"><span class="sectnum">2.9</span> Block Quotes</a></h2>
<p>Block quotes consist of indented body elements:</p>
<blockquote>
<p>My theory by A. Elk. Brackets Miss, brackets. This theory goes
@@ -459,7 +460,7 @@ notamment dans la documentation du langage Python.</p>
</blockquote>
</div>
<div class="section" id="doctest-blocks">
-<h2><a class="toc-backref" href="#id53"><span class="sectnum">2.10</span> Doctest Blocks</a></h2>
+<h2><a class="toc-backref" href="#id65"><span class="sectnum">2.10</span> Doctest Blocks</a></h2>
<pre class="code python doctest">&gt;&gt;&gt; print 'Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;'
Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;
&gt;&gt;&gt; print '(cut and pasted from interactive Python sessions)'
@@ -467,7 +468,7 @@ Python-specific usage examples; begun with &quot;&gt;&gt;&gt;&quot;
</pre>
</div>
<div class="section" id="footnotes">
-<h2><a class="toc-backref" href="#id54"><span class="sectnum">2.11</span> Footnotes</a></h2>
+<h2><a class="toc-backref" href="#id66"><span class="sectnum">2.11</span> Footnotes</a></h2>
<dl class="footnote brackets">
<dt class="label" id="id8"><span class="brackets">1</span><span class="fn-backref">(<a href="#id1">1</a>,<a href="#id9">2</a>,<a href="#id22">3</a>)</span></dt>
<dd><p>A footnote contains body elements, consistently indented by at
@@ -495,73 +496,73 @@ Here's a reference to the next footnote: <a class="footnote-reference brackets"
</dd>
<dt class="label" id="id16"><span class="brackets">4</span></dt>
<dd><p>Here's an unreferenced footnote, with a reference to a
-nonexistent footnote: <a href="#id96"><span class="problematic" id="id17">[5]_</span></a>.</p>
+nonexistent footnote: <a href="#id109"><span class="problematic" id="id17">[5]_</span></a>.</p>
</dd>
</dl>
</div>
<div class="section" id="citations">
-<h2><a class="toc-backref" href="#id55"><span class="sectnum">2.12</span> Citations</a></h2>
+<h2><a class="toc-backref" href="#id67"><span class="sectnum">2.12</span> Citations</a></h2>
<dl class="citation">
<dt class="label" id="cit2002"><span class="brackets">CIT2002</span><span class="fn-backref">(<a href="#id5">1</a>,<a href="#id18">2</a>)</span></dt>
<dd><p>Citations are text-labeled footnotes. They may be
rendered separately and differently from footnotes.</p>
</dd>
</dl>
-<p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="id18">[CIT2002]</a>, and a <a href="#id97"><span class="problematic" id="id19">[nonexistent]_</span></a>
+<p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="id18">[CIT2002]</a>, and a <a href="#id110"><span class="problematic" id="id19">[nonexistent]_</span></a>
citation.</p>
</div>
<div class="section" id="targets">
-<span id="another-target"></span><h2><a class="toc-backref" href="#id56"><span class="sectnum">2.13</span> Targets</a></h2>
+<span id="another-target"></span><h2><a class="toc-backref" href="#id68"><span class="sectnum">2.13</span> Targets</a></h2>
<p id="example">This paragraph is pointed to by the explicit &quot;example&quot; target. A
reference can be found under <a class="reference internal" href="#inline-markup">Inline Markup</a>, above. <a class="reference internal" href="#inline-hyperlink-targets">Inline
hyperlink targets</a> are also possible.</p>
<p>Section headers are implicit targets, referred to by name. See
<a class="reference internal" href="#targets">Targets</a>, which is a subsection of <a class="reference internal" href="#body-elements">Body Elements</a>.</p>
<p>Explicit external targets are interpolated into references such as
-&quot;<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#id25" id="id27">5</a>&quot;.</p>
+&quot;<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#id33" id="id35">7</a>&quot;.</p>
<p>Targets may be indirect and anonymous. Thus <a class="reference internal" href="#targets">this phrase</a> may also
refer to the <a class="reference internal" href="#targets">Targets</a> section.</p>
-<p>Here's a <a href="#id98"><span class="problematic" id="id99">`hyperlink reference without a target`_</span></a>, which generates an
+<p>Here's a <a href="#id111"><span class="problematic" id="id112">`hyperlink reference without a target`_</span></a>, which generates an
error.</p>
<div class="section" id="duplicate-target-names">
-<h3><a class="toc-backref" href="#id57"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></h3>
+<h3><a class="toc-backref" href="#id69"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></h3>
<p>Duplicate names in section headers or other implicit targets will
generate &quot;info&quot; (level-1) system messages. Duplicate names in
explicit targets will generate &quot;warning&quot; (level-2) system messages.</p>
</div>
<div class="section" id="id21">
-<h3><a class="toc-backref" href="#id58"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></h3>
+<h3><a class="toc-backref" href="#id70"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></h3>
<p>Since there are two &quot;Duplicate Target Names&quot; section headers, we
cannot uniquely refer to either of them by name. If we try to (like
-this: <a href="#id100"><span class="problematic" id="id101">`Duplicate Target Names`_</span></a>), an error is generated.</p>
+this: <a href="#id113"><span class="problematic" id="id114">`Duplicate Target Names`_</span></a>), an error is generated.</p>
</div>
</div>
<div class="section" id="directives">
-<h2><a class="toc-backref" href="#id59"><span class="sectnum">2.14</span> Directives</a></h2>
+<h2><a class="toc-backref" href="#id71"><span class="sectnum">2.14</span> Directives</a></h2>
<div class="contents local topic" id="contents">
<ul class="auto-toc simple">
-<li><p><a class="reference internal" href="#document-parts" id="id87"><span class="sectnum">2.14.1</span> Document Parts</a></p></li>
-<li><p><a class="reference internal" href="#images-and-figures" id="id88"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li>
-<li><p><a class="reference internal" href="#admonitions" id="id89"><span class="sectnum">2.14.3</span> Admonitions</a></p></li>
-<li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="id90"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></p></li>
-<li><p><a class="reference internal" href="#target-footnotes" id="id91"><span class="sectnum">2.14.5</span> Target Footnotes</a></p></li>
-<li><p><a class="reference internal" href="#replacement-text" id="id92"><span class="sectnum">2.14.6</span> Replacement Text</a></p></li>
-<li><p><a class="reference internal" href="#compound-paragraph" id="id93"><span class="sectnum">2.14.7</span> Compound Paragraph</a></p></li>
-<li><p><a class="reference internal" href="#parsed-literal-blocks" id="id94"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></p></li>
-<li><p><a class="reference internal" href="#code" id="id95"><span class="sectnum">2.14.9</span> Code</a></p></li>
+<li><p><a class="reference internal" href="#document-parts" id="id100"><span class="sectnum">2.14.1</span> Document Parts</a></p></li>
+<li><p><a class="reference internal" href="#images-and-figures" id="id101"><span class="sectnum">2.14.2</span> Images and Figures</a></p></li>
+<li><p><a class="reference internal" href="#admonitions" id="id102"><span class="sectnum">2.14.3</span> Admonitions</a></p></li>
+<li><p><a class="reference internal" href="#topics-sidebars-and-rubrics" id="id103"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></p></li>
+<li><p><a class="reference internal" href="#target-footnotes" id="id104"><span class="sectnum">2.14.5</span> Target Footnotes</a></p></li>
+<li><p><a class="reference internal" href="#replacement-text" id="id105"><span class="sectnum">2.14.6</span> Replacement Text</a></p></li>
+<li><p><a class="reference internal" href="#compound-paragraph" id="id106"><span class="sectnum">2.14.7</span> Compound Paragraph</a></p></li>
+<li><p><a class="reference internal" href="#parsed-literal-blocks" id="id107"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></p></li>
+<li><p><a class="reference internal" href="#code" id="id108"><span class="sectnum">2.14.9</span> Code</a></p></li>
</ul>
</div>
<p>These are just a sample of the many reStructuredText Directives. For
others, please see
<a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html">http://docutils.sourceforge.net/docs/ref/rst/directives.html</a>.</p>
<div class="section" id="document-parts">
-<h3><a class="toc-backref" href="#id87"><span class="sectnum">2.14.1</span> Document Parts</a></h3>
+<h3><a class="toc-backref" href="#id100"><span class="sectnum">2.14.1</span> Document Parts</a></h3>
<p>An example of the &quot;contents&quot; directive can be seen above this section
(a local, untitled table of <a class="reference internal" href="#contents">contents</a>) and at the beginning of the
document (a document-wide <a class="reference internal" href="#table-of-contents">table of contents</a>).</p>
</div>
<div class="section" id="images-and-figures">
-<h3><a class="toc-backref" href="#id88"><span class="sectnum">2.14.2</span> Images and Figures</a></h3>
+<h3><a class="toc-backref" href="#id101"><span class="sectnum">2.14.2</span> Images and Figures</a></h3>
<p>An image directive (also clickable -- a hyperlink reference):</p>
<a class="reference internal image-reference" href="#directives"><img alt="../../../docs/user/rst/images/title.png" class="class1 class2" src="../../../docs/user/rst/images/title.png" /></a>
<p>Image with multiple IDs:</p>
@@ -743,7 +744,7 @@ writer/backend).</p>
</table>
</div>
<div class="section" id="admonitions">
-<h3><a class="toc-backref" href="#id89"><span class="sectnum">2.14.3</span> Admonitions</a></h3>
+<h3><a class="toc-backref" href="#id102"><span class="sectnum">2.14.3</span> Admonitions</a></h3>
<div class="admonition attention">
<p class="admonition-title">Attention!</p>
<p>Directives at large.</p>
@@ -792,7 +793,7 @@ Reader discretion is strongly advised.</p>
</div>
</div>
<div class="section" id="topics-sidebars-and-rubrics">
-<h3><a class="toc-backref" href="#id90"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></h3>
+<h3><a class="toc-backref" href="#id103"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></h3>
<p><em>Sidebars</em> are like miniature, parallel documents.</p>
<div class="sidebar">
<p class="sidebar-title">Sidebar Title</p>
@@ -816,31 +817,37 @@ document's structure. It is typically highlighted in red (hence the name).</p>
allowed (e.g. inside a directive).</p>
</div>
<div class="section" id="target-footnotes">
-<h3><a class="toc-backref" href="#id91"><span class="sectnum">2.14.5</span> Target Footnotes</a></h3>
+<h3><a class="toc-backref" href="#id104"><span class="sectnum">2.14.5</span> Target Footnotes</a></h3>
<dl class="footnote brackets">
-<dt class="label" id="id25"><span class="brackets">5</span><span class="fn-backref">(<a href="#id26">1</a>,<a href="#id27">2</a>,<a href="#id28">3</a>,<a href="#id35">4</a>)</span></dt>
+<dt class="label" id="id33"><span class="brackets">7</span><span class="fn-backref">(<a href="#id34">1</a>,<a href="#id35">2</a>,<a href="#id36">3</a>,<a href="#id45">4</a>)</span></dt>
<dd><p><a class="reference external" href="http://www.python.org/">http://www.python.org/</a></p>
</dd>
-<dt class="label" id="id29"><span class="brackets"><a class="fn-backref" href="#id30">6</a></span></dt>
+<dt class="label" id="id37"><span class="brackets"><a class="fn-backref" href="#id38">8</a></span></dt>
<dd><p><a class="reference external" href="http://pygments.org/">http://pygments.org/</a></p>
</dd>
-<dt class="label" id="id31"><span class="brackets"><a class="fn-backref" href="#id32">7</a></span></dt>
+<dt class="label" id="id39"><span class="brackets"><a class="fn-backref" href="#id40">9</a></span></dt>
+<dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text</a></p>
+</dd>
+<dt class="label" id="id41"><span class="brackets"><a class="fn-backref" href="#id42">10</a></span></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">http://docutils.sourceforge.net/docs/user/config.html#table-style</a></p>
</dd>
-<dt class="label" id="id33"><span class="brackets"><a class="fn-backref" href="#id34">8</a></span></dt>
+<dt class="label" id="id43"><span class="brackets"><a class="fn-backref" href="#id44">11</a></span></dt>
<dd><p><a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf</a></p>
</dd>
-<dt class="label" id="id36"><span class="brackets"><a class="fn-backref" href="#id37">9</a></span></dt>
+<dt class="label" id="id46"><span class="brackets"><a class="fn-backref" href="#id47">12</a></span></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</a></p>
</dd>
+<dt class="label" id="id48"><span class="brackets"><a class="fn-backref" href="#id49">13</a></span></dt>
+<dd><p><a class="reference external" href="https://html.spec.whatwg.org/#text-level-semantics">https://html.spec.whatwg.org/#text-level-semantics</a></p>
+</dd>
</dl>
</div>
<div class="section" id="replacement-text">
-<h3><a class="toc-backref" href="#id92"><span class="sectnum">2.14.6</span> Replacement Text</a></h3>
-<p>I recommend you try <a class="reference external" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference brackets" href="#id25" id="id28">5</a>.</p>
+<h3><a class="toc-backref" href="#id105"><span class="sectnum">2.14.6</span> Replacement Text</a></h3>
+<p>I recommend you try <a class="reference external" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference brackets" href="#id33" id="id36">7</a>.</p>
</div>
<div class="section" id="compound-paragraph">
-<h3><a class="toc-backref" href="#id93"><span class="sectnum">2.14.7</span> Compound Paragraph</a></h3>
+<h3><a class="toc-backref" href="#id106"><span class="sectnum">2.14.7</span> Compound Paragraph</a></h3>
<p>The <em>compound</em> directive is used to create a &quot;compound paragraph&quot;, which
is a single logical paragraph containing multiple physical body
elements. For example:</p>
@@ -951,7 +958,7 @@ by</p>
</div>
</div>
<div class="section" id="parsed-literal-blocks">
-<h3><a class="toc-backref" href="#id94"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></h3>
+<h3><a class="toc-backref" href="#id107"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></h3>
<pre class="literal-block">This is a parsed literal block.
This line is indented. The next line is blank.
@@ -961,9 +968,9 @@ inline formulas: <span class="formula"><i>A</i> = 2<i>π</i><i>r</i><sup>2</
footnotes <a class="footnote-reference brackets" href="#id8" id="id22">1</a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>.</pre>
</div>
<div class="section" id="code">
-<h3><a class="toc-backref" href="#id95"><span class="sectnum">2.14.9</span> Code</a></h3>
+<h3><a class="toc-backref" href="#id108"><span class="sectnum">2.14.9</span> Code</a></h3>
<p>Blocks of source code can be set with the <cite>code</cite> directive. If the code
-language is specified, the content is parsed and tagged by the <a class="reference external" href="http://pygments.org/">Pygments</a> <a class="footnote-reference brackets" href="#id29" id="id30">6</a>
+language is specified, the content is parsed and tagged by the <a class="reference external" href="http://pygments.org/">Pygments</a> <a class="footnote-reference brackets" href="#id37" id="id38">8</a>
syntax highlighter and can be formatted with a style sheet. (Code parsing
is turned off using the <span class="docutils literal"><span class="pre">syntax-highlight</span></span> config setting in the test
conversions in order to get identical results with/without installed
@@ -987,13 +994,13 @@ as a code block, here the rst file <span class="docutils literal">header_footer.
</div>
</div>
<div class="section" id="substitution-definitions">
-<h2><a class="toc-backref" href="#id69"><span class="sectnum">2.15</span> Substitution Definitions</a></h2>
+<h2><a class="toc-backref" href="#id81"><span class="sectnum">2.15</span> Substitution Definitions</a></h2>
<p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) example:</p>
<p>A Unicode example:</p>
<p>(Substitution definitions are not visible in the HTML source.)</p>
</div>
<div class="section" id="comments">
-<h2><a class="toc-backref" href="#id70"><span class="sectnum">2.16</span> Comments</a></h2>
+<h2><a class="toc-backref" href="#id82"><span class="sectnum">2.16</span> Comments</a></h2>
<p>Here's one:</p>
<!-- Comments begin with two dots and a space. Anything may
follow, except for the syntax of footnotes, hyperlink
@@ -1005,20 +1012,20 @@ Comments may contain non-ASCII characters: ä ö ü æ ø å -->
<p>(View the HTML source to see the comment.)</p>
</div>
<div class="section" id="raw-text">
-<h2><a class="toc-backref" href="#id71"><span class="sectnum">2.17</span> Raw text</a></h2>
+<h2><a class="toc-backref" href="#id83"><span class="sectnum">2.17</span> Raw text</a></h2>
<p>This does not necessarily look nice, because there may be missing white space.</p>
<p>It's just there to freeze the behavior.</p>
A test.Second test.<div class="myclass">Another test with myclass set.</div><p>This is the <span class="myrawroleclass">fourth test</span> with myrawroleclass set.</p>
Fifth test in HTML.<br />Line two.</div>
<div class="section" id="container">
-<h2><a class="toc-backref" href="#id72"><span class="sectnum">2.18</span> Container</a></h2>
+<h2><a class="toc-backref" href="#id84"><span class="sectnum">2.18</span> Container</a></h2>
<div class="custom docutils container">
<p>paragraph 1</p>
<p>paragraph 2</p>
</div>
</div>
<div class="section" id="colspanning-tables">
-<h2><a class="toc-backref" href="#id73"><span class="sectnum">2.19</span> Colspanning tables</a></h2>
+<h2><a class="toc-backref" href="#id85"><span class="sectnum">2.19</span> Colspanning tables</a></h2>
<p>This table has a cell spanning two columns:</p>
<table>
<colgroup>
@@ -1056,7 +1063,7 @@ Fifth test in HTML.<br />Line two.</div>
</table>
</div>
<div class="section" id="rowspanning-tables">
-<h2><a class="toc-backref" href="#id74"><span class="sectnum">2.20</span> Rowspanning tables</a></h2>
+<h2><a class="toc-backref" href="#id86"><span class="sectnum">2.20</span> Rowspanning tables</a></h2>
<p>Here's a table with cells spanning several rows:</p>
<table>
<colgroup>
@@ -1089,7 +1096,7 @@ cell.</p></td>
</table>
</div>
<div class="section" id="complex-tables">
-<h2><a class="toc-backref" href="#id75"><span class="sectnum">2.21</span> Complex tables</a></h2>
+<h2><a class="toc-backref" href="#id87"><span class="sectnum">2.21</span> Complex tables</a></h2>
<p>Here's a complex table, which should test all features.</p>
<table>
<colgroup>
@@ -1138,7 +1145,7 @@ empty: <span class="docutils literal"><span class="pre">--&gt;</span></span></p>
</table>
</div>
<div class="section" id="list-tables">
-<h2><a class="toc-backref" href="#id76"><span class="sectnum">2.22</span> List Tables</a></h2>
+<h2><a class="toc-backref" href="#id88"><span class="sectnum">2.22</span> List Tables</a></h2>
<p>Here's a list table exercising all features:</p>
<table class="colwidths-given test" style="width: 40em">
<caption>list table with integral header</caption>
@@ -1185,7 +1192,7 @@ crunchy, now would it?</p></td>
</table>
</div>
<div class="section" id="custom-roles">
-<h2><a class="toc-backref" href="#id77"><span class="sectnum">2.23</span> Custom Roles</a></h2>
+<h2><a class="toc-backref" href="#id89"><span class="sectnum">2.23</span> Custom Roles</a></h2>
<ul>
<li><p>A role based on an existing role.</p>
<p><span class="custom docutils literal">one</span> <span class="custom docutils literal">two</span> <span class="custom docutils literal">three</span></p>
@@ -1213,7 +1220,7 @@ crunchy, now would it?</p></td>
</ul>
</div>
<div class="section" id="svg-images">
-<h2><a class="toc-backref" href="#id78"><span class="sectnum">2.24</span> SVG Images</a></h2>
+<h2><a class="toc-backref" href="#id90"><span class="sectnum">2.24</span> SVG Images</a></h2>
<img alt="../../../docs/user/rst/images/biohazard.svg" class="align-left" src="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" />
<p>Scalable vector graphics (SVG) images are the only standards-compliable way
to include vector graphics in HTML documents. However, they are not
@@ -1298,7 +1305,7 @@ tags.</p>
</blockquote>
</div>
<div class="section" id="swf-images">
-<h2><a class="toc-backref" href="#id79"><span class="sectnum">2.25</span> SWF Images</a></h2>
+<h2><a class="toc-backref" href="#id91"><span class="sectnum">2.25</span> SWF Images</a></h2>
<p>Shockwave Flash is an image/movie format that most modern web browsers
support via a plugin. It is sometimes blocked due to privacy/security
concerns.</p>
@@ -1310,8 +1317,223 @@ For complete control over display options use raw HTML.</p>
<p>An inline SWF image <object data="../../../docs/user/rst/images/biohazard.swf" style="width: 0.8em; height: 0.8em;" type="application/x-shockwave-flash">inline-swf</object> scaled to 0.8 em x 0.8 em.</p>
</div>
</div>
+<div class="section" id="text-level-semantics">
+<h1><a class="toc-backref" href="#id92"><span class="sectnum">3</span> Text-level semantics</a></h1>
+<p><a class="reference external" href="https://html.spec.whatwg.org/#text-level-semantics">HTML 5 tags for representation of text-level semantics</a> <a class="footnote-reference brackets" href="#id48" id="id49">13</a> and their
+reStructuredText equivalents.</p>
+<dl class="narrow field-list">
+<dt>a</dt>
+<dd><p>Hyperlinks</p>
+<blockquote>
+<p>Visit my <a class="reference external" href="example.org:drinks.html">drinks</a> page.</p>
+</blockquote>
+</dd>
+<dt>em</dt>
+<dd><p>Stress emphasis</p>
+<blockquote>
+<p>I must say I <em>adore</em> lemonade. I's <em>sooo</em> sweet.</p>
+</blockquote>
+</dd>
+<dt>strong</dt>
+<dd><p>Importance</p>
+<blockquote>
+<p><strong>Warning</strong>: This tea is <strong>very hot</strong>.</p>
+</blockquote>
+</dd>
+<dt>small</dt>
+<dd><p>Side comments</p>
+<blockquote>
+<p>These grapes are made into wine.
+<span class="small">Alcohol is addictive.</span></p>
+</blockquote>
+</dd>
+<dt>s</dt>
+<dd><p>Inaccurate text</p>
+<blockquote>
+<p>Price: <span class="s">£4.50</span> £2.00!</p>
+</blockquote>
+</dd>
+<dt>cite</dt>
+<dd><p>Titles of works</p>
+<blockquote>
+<p>The case <cite>Hugo v. Danielle</cite> is relevant here.
+I recommend reading <cite>Harry Potter</cite>.</p>
+</blockquote>
+</dd>
+<dt>q</dt>
+<dd><p>Quotations</p>
+<blockquote>
+<p>The judge said <span class="q">You can drink water from the fish tank</span>
+but advised against it.</p>
+</blockquote>
+</dd>
+<dt>dfn</dt>
+<dd><p>Defining instance</p>
+<blockquote>
+<p>The term <span class="dfn">organic food</span> refers to food produced without synthetic
+chemicals.</p>
+</blockquote>
+</dd>
+<dt>abbr</dt>
+<dd><p>Abbreviations <a class="footnote-reference brackets" href="#attribute-optional" id="id24">5</a></p>
+<blockquote>
+<p>Organic food in Ireland is certified by the <abbr>IOFGA</abbr> <a class="footnote-reference brackets" href="#id26" id="id25">‡</a></p>
+</blockquote>
+<p>In rST there are separate roles for <cite>abbreviations</cite> <abbr>rsp.</abbr>
+<cite>acronymes</cite>. In HTML, the &lt;acronym&gt; tag is obsolete and authors are
+advised to use &lt;abbr&gt; instead. The HTML5 writer uses &lt;abbr&gt; for Docutil's
+&lt;abbreviation&gt; element.</p>
+<dl class="footnote brackets">
+<dt class="label" id="id26"><span class="brackets"><a class="fn-backref" href="#id25">‡</a></span></dt>
+<dd><p>Irish Organic Farmers and Growers Association</p>
+</dd>
+</dl>
+</dd>
+<dt>ruby, rt, rp</dt>
+<dd><p>Ruby annotations</p>
+<p>Require inline nesting, currently not supported in rST.</p>
+<blockquote>
+<p>&lt;ruby&gt; OJ &lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;Orange Juice&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;&lt;/ruby&gt;</p>
+</blockquote>
+</dd>
+<dt>data</dt>
+<dd><p>Machine-readable equivalent <a class="footnote-reference brackets" href="#attribute-required" id="id27">6</a></p>
+<blockquote>
+<p>Available starting today! &lt;data value=&quot;UPC:022014640201&quot;&gt;North Coast
+Organic Apple Cider&lt;/data&gt;</p>
+</blockquote>
+</dd>
+<dt>time</dt>
+<dd><p>Machine-readable equivalent of date- or time-related data <a class="footnote-reference brackets" href="#attribute-required" id="id28">6</a></p>
+<blockquote>
+<p>Available starting on &lt;time datetime=&quot;2011-11-18&quot;&gt;November 18th&lt;/time&gt;!</p>
+</blockquote>
+</dd>
+<dt>code</dt>
+<dd><p>Computer code</p>
+<blockquote>
+<p>The <code>fruitdb</code> program can be used for tracking fruit production.</p>
+</blockquote>
+</dd>
+<dt>var</dt>
+<dd><p>Variables</p>
+<blockquote>
+<p>If there are <span class="var">n</span> fruit in the bowl, at least <span class="var">n</span>÷2 will be
+ripe.</p>
+</blockquote>
+</dd>
+<dt>samp</dt>
+<dd><p>Computer output</p>
+<blockquote>
+<p>The computer said <span class="samp docutils literal">Unknown error <span class="pre">-3</span></span>.</p>
+</blockquote>
+</dd>
+<dt>kbd</dt>
+<dd><p>User input</p>
+<blockquote>
+<p>Hit <span class="kbd">F1</span> to continue.</p>
+</blockquote>
+</dd>
+<dt>sub</dt>
+<dd><p>Subscripts</p>
+<blockquote>
+<p>Water is H<sub>2</sub>O.</p>
+</blockquote>
+</dd>
+<dt>sup</dt>
+<dd><p>Superscripts</p>
+<blockquote>
+<p>The Hydrogen in heavy water is usually <sup>2</sup>H.</p>
+</blockquote>
+</dd>
+<dt>i</dt>
+<dd><p>Alternative voice</p>
+<blockquote>
+<p>Lemonade consists primarily of <span class="i" lang="la">Citrus limon</span>.</p>
+</blockquote>
+</dd>
+<dt>b</dt>
+<dd><p>Keywords</p>
+<blockquote>
+<p>Take a <span class="b">lemon</span> and squeeze it with a <span class="b">juicer</span>.</p>
+</blockquote>
+</dd>
+<dt>u</dt>
+<dd><p>Annotations</p>
+<blockquote>
+<p>The mixture of apple juice and <span class="u spelling">eldeflower</span> juice is very
+pleasant.</p>
+</blockquote>
+</dd>
+<dt>mark</dt>
+<dd><p>Highlight</p>
+<blockquote>
+<p>Elderflower cordial, with one <span class="mark">part</span> cordial to ten
+<span class="mark">part</span>s water, stands a<span class="mark">part</span> from the rest.</p>
+</blockquote>
+</dd>
+<dt>bdi</dt>
+<dd><p>Text directionality isolation <a class="footnote-reference brackets" href="#attribute-optional" id="id29">5</a></p>
+<blockquote>
+<p>The recommended restaurant is <span class="bdi">My Juice Café (At The Beach)</span>.</p>
+</blockquote>
+<p>The <cite>dir</cite> global attribute defaults to &quot;auto&quot; (not &quot;inherit&quot;) on this
+element.</p>
+</dd>
+<dt>bdo</dt>
+<dd><p>Text directionality formatting <a class="footnote-reference brackets" href="#attribute-required" id="id30">6</a></p>
+<blockquote>
+<p>The proposal is to write English, but in reverse order. &quot;Juice&quot; would
+become &quot;&lt;bdo dir=rtl&gt;Juice&lt;/bdo&gt;&quot;&gt;</p>
+</blockquote>
+<p>Authors must specify the dir attribute on this element.</p>
+</dd>
+<dt>span</dt>
+<dd><p>Other</p>
+<blockquote>
+<p>In French we call it <span lang="fr">sirop de sureau</span>.</p>
+</blockquote>
+</dd>
+<dt>br</dt>
+<dd><p>Line break</p>
+<p>For complete paragraphs, use a line-block:</p>
+<blockquote>
+<div class="line-block">
+<div class="line">Simply Orange Juice Company</div>
+<div class="line">Apopka, FL 32703</div>
+<div class="line">U.S.A.</div>
+</div>
+</blockquote>
+<p>rST does not natively support an exceptional hard line break in a floating
+paragraph. You may use a HTML-only substitution.</p>
+<blockquote>
+<p>I want to break this line after the colon: <br /> but allow other
+linebreaks in this paragraph according to the width of the containing
+block.</p>
+</blockquote>
+</dd>
+<dt>wbr</dt>
+<dd><p>Line breaking opportunity</p>
+<p>Not supported by rST. You may use a ZWSP character (u200B), literal or via
+a substitution.</p>
+<blockquote>
+<p>www.simply​​​orange​juice.com</p>
+</blockquote>
+</dd>
+</dl>
+<dl class="footnote brackets">
+<dt class="label" id="attribute-optional"><span class="brackets">5</span><span class="fn-backref">(<a href="#id24">1</a>,<a href="#id29">2</a>)</span></dt>
+<dd><p>Would gain from support for attributes to inline
+roles (title argument). See <a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">TODO</a> <a class="footnote-reference brackets" href="#id39" id="id40">9</a></p>
+</dd>
+<dt class="label" id="attribute-required"><span class="brackets">6</span><span class="fn-backref">(<a href="#id27">1</a>,<a href="#id28">2</a>,<a href="#id30">3</a>)</span></dt>
+<dd><p>Requires support for attributes to inline
+roles to make sense.</p>
+</dd>
+</dl>
+</div>
<div class="section" id="changes-to-the-html4css1-writer">
-<h1><a class="toc-backref" href="#id80"><span class="sectnum">3</span> Changes to the html4css1 writer</a></h1>
+<h1><a class="toc-backref" href="#id93"><span class="sectnum">4</span> Changes to the html4css1 writer</a></h1>
<ul class="simple">
<li><p>Use only meta keywords recognized by HTML 5.</p></li>
<li><p>Set table column widths with &lt;style=&quot;width: ...&quot;&gt;, not &quot;width&quot; argument.</p></li>
@@ -1322,7 +1544,7 @@ space.</p></li>
<li><p>Put subtitles in &lt;p&gt; elements.</p></li>
</ul>
<div class="section" id="field-list-handling">
-<h2><a class="toc-backref" href="#id81"><span class="sectnum">3.1</span> Field list handling</a></h2>
+<h2><a class="toc-backref" href="#id94"><span class="sectnum">4.1</span> Field list handling</a></h2>
<p>The following list demonstrates the problems with the html4css1
approach: the <cite>field-name-limit</cite> setting is given in &quot;number of
characters&quot; but the field name uses a proportional font.</p>
@@ -1366,11 +1588,11 @@ example:</p>
</dl>
</div>
<div class="section" id="styling-with-class-arguments">
-<h2><a class="toc-backref" href="#id82"><span class="sectnum">3.2</span> Styling with class arguments</a></h2>
+<h2><a class="toc-backref" href="#id95"><span class="sectnum">4.2</span> Styling with class arguments</a></h2>
<p>The <span class="docutils literal">plain.css</span> style sheet comes with some pre-defined style variants
that can be choosen via a class argument.</p>
<div class="section" id="description-lists">
-<h3><a class="toc-backref" href="#id83"><span class="sectnum">3.2.1</span> Description lists</a></h3>
+<h3><a class="toc-backref" href="#id96"><span class="sectnum">4.2.1</span> Description lists</a></h3>
<p>Definition lists with the &quot;description&quot; class argument:</p>
<dl class="description simple">
<dt>description lists</dt>
@@ -1386,7 +1608,7 @@ encyclopedias etc. (as well as the LaTeX <cite>description</cite> environment).<
</dl>
</div>
<div class="section" id="field-list-variants">
-<h3><a class="toc-backref" href="#id84"><span class="sectnum">3.2.2</span> Field list variants</a></h3>
+<h3><a class="toc-backref" href="#id97"><span class="sectnum">4.2.2</span> Field list variants</a></h3>
<p>For field lists, the &quot;compact/open&quot;, &quot;narrow&quot; and &quot;run-in&quot; styles are defined
in the style sheet <span class="docutils literal">plain.css</span>.</p>
<dl class="simple">
@@ -1453,9 +1675,9 @@ body is wrapped and aligns with other fields.</p>
</dl>
</div>
<div class="section" id="table-variants">
-<h3><a class="toc-backref" href="#id85"><span class="sectnum">3.2.3</span> Table variants</a></h3>
+<h3><a class="toc-backref" href="#id98"><span class="sectnum">4.2.3</span> Table variants</a></h3>
<p>The following styles can be applied to individual tables via a class
-argument or as document wide setting with the <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style</a> <a class="footnote-reference brackets" href="#id31" id="id32">7</a> configuration
+argument or as document wide setting with the <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style</a> <a class="footnote-reference brackets" href="#id41" id="id42">10</a> configuration
setting (or command line argument).</p>
<ul>
<li><p>Numbered tables can be achieved with the &quot;numbered&quot; class option:</p>
@@ -1495,7 +1717,7 @@ setting (or command line argument).</p>
common request and already on the <cite>TODO list</cite>.</p>
</li>
<li><p>A table with &quot;booktabs&quot; class value, is rendered similar to the style
-from the <a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs</a> <a class="footnote-reference brackets" href="#id33" id="id34">8</a> LaTeX package.</p>
+from the <a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs</a> <a class="footnote-reference brackets" href="#id43" id="id44">11</a> LaTeX package.</p>
</li>
</ul>
<p>&quot;Booktabs&quot; style table, numbered, centre-aligned, with auto-sized columns:</p>
@@ -1535,7 +1757,7 @@ from the <a class="reference external" href="http://tug.ctan.org/tex-archive/mac
</div>
</div>
<div class="section" id="error-handling">
-<h1><a class="toc-backref" href="#id86"><span class="sectnum">4</span> Error Handling</a></h1>
+<h1><a class="toc-backref" href="#id99"><span class="sectnum">5</span> Error Handling</a></h1>
<p>Any errors caught during processing will generate system messages.</p>
<p>There should be five messages in the following, auto-generated
section, &quot;Docutils System Messages&quot;:</p>
@@ -1543,24 +1765,24 @@ section, &quot;Docutils System Messages&quot;:</p>
</div>
<div class="system-messages section">
<h1>Docutils System Messages</h1>
-<div class="system-message" id="id23">
-<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 104); <em><a href="#id24">backlink</a></em></p>
+<div class="system-message" id="id31">
+<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 104); <em><a href="#id32">backlink</a></em></p>
<p>Undefined substitution referenced: &quot;problematic&quot;.</p>
</div>
-<div class="system-message" id="id96">
+<div class="system-message" id="id109">
<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 392); <em><a href="#id17">backlink</a></em></p>
<p>Unknown target name: &quot;5&quot;.</p>
</div>
-<div class="system-message" id="id97">
+<div class="system-message" id="id110">
<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 401); <em><a href="#id19">backlink</a></em></p>
<p>Unknown target name: &quot;nonexistent&quot;.</p>
</div>
-<div class="system-message" id="id98">
-<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 428); <em><a href="#id99">backlink</a></em></p>
+<div class="system-message" id="id111">
+<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 428); <em><a href="#id112">backlink</a></em></p>
<p>Unknown target name: &quot;hyperlink reference without a target&quot;.</p>
</div>
-<div class="system-message" id="id100">
-<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 441); <em><a href="#id101">backlink</a></em></p>
+<div class="system-message" id="id113">
+<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal">functional/input/data/standard.txt</span>, line 441); <em><a href="#id114">backlink</a></em></p>
<p>Duplicate target name, cannot be used as a unique reference: &quot;duplicate target names&quot;.</p>
</div>
</div>
diff --git a/docutils/test/functional/input/html5-text-level-tags.txt b/docutils/test/functional/input/html5-text-level-tags.txt
new file mode 100644
index 000000000..31ab66baa
--- /dev/null
+++ b/docutils/test/functional/input/html5-text-level-tags.txt
@@ -0,0 +1,227 @@
+Text-level semantics
+====================
+
+`HTML 5 tags for representation of text-level semantics`__ and their
+reStructuredText equivalents.
+
+__ https://html.spec.whatwg.org/#text-level-semantics
+
+.. class:: narrow
+
+:a:
+ Hyperlinks
+
+ Visit my `drinks <example.org:drinks.html>`_ page.
+
+:em:
+ Stress emphasis
+
+ I must say I *adore* lemonade. I's :emphasis:`sooo` sweet.
+
+:strong:
+ Importance
+
+ **Warning**: This tea is :strong:`very hot`.
+
+:small:
+ Side comments
+
+ .. role:: small
+
+ These grapes are made into wine.
+ :small:`Alcohol is addictive.`
+
+:s:
+ Inaccurate text
+
+ .. role:: strikeout
+ :class: s
+
+ Price: :strikeout:`£4.50` £2.00!
+
+:cite:
+ Titles of works
+
+ The case `Hugo v. Danielle` is relevant here.
+ I recommend reading :title:`Harry Potter`.
+
+:q:
+ Quotations
+
+ .. role:: quotation
+ :class: q
+
+ The judge said :quotation:`You can drink water from the fish tank`
+ but advised against it.
+
+:dfn:
+ Defining instance
+
+ .. role:: dfn
+
+ The term :dfn:`organic food` refers to food produced without synthetic
+ chemicals.
+
+:abbr:
+ Abbreviations [#attribute-optional]_
+
+ Organic food in Ireland is certified by the :acronym:`IOFGA` [*]_
+
+ In rST there are separate roles for `abbreviations` :abbreviation:`rsp.`
+ `acronymes`. In HTML, the <acronym> tag is obsolete and authors are
+ advised to use <abbr> instead. The HTML5 writer uses <abbr> for Docutil's
+ <abbreviation> element.
+
+ .. [*] Irish Organic Farmers and Growers Association
+
+:ruby, rt, rp: Ruby annotations
+
+ Require inline nesting, currently not supported in rST.
+
+ <ruby> OJ <rp>(</rp><rt>Orange Juice</rt><rp>)</rp></ruby>
+
+:data:
+ Machine-readable equivalent [#attribute-required]_
+
+ Available starting today! <data value="UPC:022014640201">North Coast
+ Organic Apple Cider</data>
+
+
+:time:
+ Machine-readable equivalent of date- or time-related data [#attribute-required]_
+
+ Available starting on <time datetime="2011-11-18">November 18th</time>!
+
+:code:
+ Computer code
+
+ The :code:`fruitdb` program can be used for tracking fruit production.
+
+:var:
+ Variables
+
+ .. role:: var
+
+ If there are :var:`n` fruit in the bowl, at least :var:`n`\ ÷2 will be
+ ripe.
+
+:samp:
+ Computer output
+
+ .. role:: samp(literal)
+
+ The computer said :samp:`Unknown error -3`.
+
+:kbd:
+ User input
+
+ .. role:: kbd
+
+ Hit :kbd:`F1` to continue.
+
+:sub:
+ Subscripts
+
+ Water is H\ :sub:`2`\O.
+
+:sup:
+ Superscripts
+
+ The Hydrogen in heavy water is usually :sup:`2`\H.
+
+:i:
+ Alternative voice
+
+ .. role:: alternative-voice
+ :class: i, language-la
+
+ Lemonade consists primarily of :alternative-voice:`Citrus limon`.
+
+:b:
+ Keywords
+
+ .. role:: b
+
+ Take a :b:`lemon` and squeeze it with a :b:`juicer`.
+
+:u:
+ Annotations
+
+ .. role:: spelling
+ :class: u, spelling
+
+ The mixture of apple juice and :spelling:`eldeflower` juice is very
+ pleasant.
+
+:mark:
+ Highlight
+
+ .. role:: mark
+
+ Elderflower cordial, with one :mark:`part` cordial to ten
+ :mark:`part`\ s water, stands a\ :mark:`part` from the rest.
+
+:bdi:
+ Text directionality isolation [#attribute-optional]_
+
+ .. role:: bdi
+
+ The recommended restaurant is :bdi:`My Juice Café (At The Beach)`.
+
+ The `dir` global attribute defaults to "auto" (not "inherit") on this
+ element.
+
+:bdo:
+ Text directionality formatting [#attribute-required]_
+
+ The proposal is to write English, but in reverse order. "Juice" would
+ become "<bdo dir=rtl>Juice</bdo>">
+
+ Authors must specify the dir attribute on this element.
+
+:span:
+ Other
+
+ .. role:: language-fr
+
+ In French we call it :language-fr:`sirop de sureau`.
+
+:br:
+ Line break
+
+ For complete paragraphs, use a line-block:
+
+ | Simply Orange Juice Company
+ | Apopka, FL 32703
+ | U.S.A.
+
+ rST does not natively support an exceptional hard line break in a floating
+ paragraph. You may use a HTML-only substitution.
+
+ .. |br| raw:: html
+
+ <br />
+
+ I want to break this line after the colon: |br| but allow other
+ linebreaks in this paragraph according to the width of the containing
+ block.
+
+:wbr:
+ Line breaking opportunity
+
+ Not supported by rST. You may use a ZWSP character (u200B), literal or via
+ a substitution.
+
+ .. |wbr| unicode:: 0x200B
+
+ www.simply​​\ |wbr|\orange\ |wbr|\juice.com
+
+
+.. [#attribute-optional] Would gain from support for attributes to inline
+ roles (title argument). See TODO_
+
+.. [#attribute-required] Requires support for attributes to inline
+ roles to make sense.
+
+
+.. _TODO: http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text
diff --git a/docutils/test/functional/input/standalone_rst_html5.txt b/docutils/test/functional/input/standalone_rst_html5.txt
index 92eb6e0ca..0d5667929 100644
--- a/docutils/test/functional/input/standalone_rst_html5.txt
+++ b/docutils/test/functional/input/standalone_rst_html5.txt
@@ -7,6 +7,7 @@
.. include:: data/custom_roles.txt
.. include:: data/svg_images.txt
.. include:: data/swf_images.txt
+.. include:: html5-text-level-tags.txt
Changes to the html4css1 writer
===============================
@@ -184,7 +185,6 @@ setting (or command line argument).
True True True
======= ======= ==========
-
.. include:: data/errors.txt
.. footer:: |HTML 5| |validator| |valid-CSS2|