use p tag within hgroup example

HTML linters will display errors when the example is copied as is.  This is because the standard requires that only one h* tag is used.  See https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element.
This commit is contained in:
Eric Fortmeyer 2023-09-16 17:14:31 -05:00 committed by GitHub
parent 5ce6840d49
commit 5e012413c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,10 +5,10 @@
&lt;<b>h5</b>&gt;Heading 5&lt;/<b>h5</b>&gt;
&lt;<b>h6</b>&gt;Heading 6&lt;/<b>h6</b>&gt;</code></pre></footer></article><p>Inside a <code>&lt;<b>hgroup</b>&gt;</code> or a <code>&lt;<b>div</b> <i>class</i>=<u>"headings"</u>&gt;</code> all <code><i>margin-bottom</i></code> are collapsed and the <code>:last-child</code> is muted.</p><article aria-label="Hgroup example"><div class="headings"><h2>Heading 2</h2><h3>Subtitle for heading 2</h3></div><footer class="code"><pre><code>&lt;<b>hgroup</b>&gt;
&lt;<b>h2</b>&gt;Heading 2&lt;/<b>h2</b>&gt;
&lt;<b>h3</b>&gt;Subtitle for heading 2&lt;/<b>h3</b>&gt;
&lt;<b>p</b>&gt;Subtitle for heading 2&lt;/<b>p</b>&gt;
&lt;/<b>hgroup</b>&gt;</code></pre><pre><code>&lt;<b>div</b> <i>class</i>=<u>"headings</u>"&gt;
&lt;<b>h2</b>&gt;Heading 2&lt;/<b>h2</b>&gt;
&lt;<b>h3</b>&gt;Subtitle for heading 2&lt;/<b>h3</b>&gt;
&lt;<b>p</b>&gt;Subtitle for heading 2&lt;/<b>p</b>&gt;
&lt;/<b>div</b>&gt;</code></pre></footer></article><p>Inline text elements:</p><article aria-label="Inline text examples"><div class="grid"><div><p><abbr title="Abbreviation">Abbr.</abbr> <code>abbr</code></p><p><strong>Bold</strong> <code>strong</code> <code>b</code></p><p><em>Italic</em> <code>i</code> <code>em</code> <code>cite</code></p><p><del>Deleted</del> <code>del</code></p><p><ins>Inserted</ins> <code>ins</code></p><p><kbd>Ctrl + S</kbd> <code>kbd</code></p></div><div><p><mark>Highlighted</mark> <code>mark</code></p><p><s>Strikethrough</s> <code>s</code></p><p><small>Small </small><code>small</code></p><p>Text <sub>Sub</sub> <code>sub</code></p><p>Text <sup>Sup</sup> <code>sup</code></p><p><u>Underline</u> <code>u</code></p></div></div></article><p>Links come with <code>.secondary</code> and <code>.contrast</code> styles.</p><p>&nbsp;These classes are not available in the <a href="classless.html">class-less version</a>.</p><article aria-label="Links examples"><a href="#" onclick="event.preventDefault()">Primary</a><br/><a href="#" onclick="event.preventDefault()" class="secondary">Secondary</a><br/><a href="#" onclick="event.preventDefault()" class="contrast">Contrast</a><br/><footer class="code"><pre><code>&lt;<b>a</b> <i>href</i>=<u>"#"</u>&gt;Primary&lt;/<b>a</b>&gt;
&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>class</i>=<u>"secondary"</u>&gt;Secondary&lt;/<b>a</b>&gt;
&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>class</i>=<u>"contrast"</u>&gt;Contrast&lt;/<b>a</b>&gt;</code></pre></footer></article><p>Blockquote:</p><article aria-label="Blockquote example"><blockquote>"Maecenas vehicula metus tellus, vitae congue turpis hendrerit non. Nam at dui sit amet ipsum cursus ornare."<footer><cite>- Phasellus eget lacinia</cite></footer></blockquote><footer class="code"><pre><code>&lt;<b>blockquote</b>&gt;