Skip to content

Commit b1d5d6b

Browse files
authored
fix(elements.html): follow section heading good practices (#76)
Avoid multiple `h1` headings in the same HTML page.
1 parent 9933ca7 commit b1d5d6b

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

elements.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ <h1>HTML5 Test Page</h1>
6161
<main role="main">
6262
<section id="text">
6363
<header>
64-
<h1>Text</h1>
64+
<h2>Text</h2>
6565
</header>
6666
<article id="text__headings">
6767
<header>
68-
<h1>Headings</h1>
68+
<h2>Headings</h2>
6969
</header>
7070
<div>
7171
<h1>Heading 1</h1>
@@ -81,7 +81,7 @@ <h6>Heading 6</h6>
8181
</article>
8282
<article id="text__paragraphs">
8383
<header>
84-
<h1>Paragraphs</h1>
84+
<h2>Paragraphs</h2>
8585
</header>
8686
<div>
8787
<p>A paragraph (from the Greek paragraphos, “to write beside” or “written beside”) is a self-contained unit
@@ -95,7 +95,7 @@ <h1>Paragraphs</h1>
9595
</article>
9696
<article id="text__blockquotes">
9797
<header>
98-
<h1>Blockquotes</h1>
98+
<h2>Blockquotes</h2>
9999
</header>
100100
<div>
101101
<blockquote>
@@ -112,21 +112,21 @@ <h1>Blockquotes</h1>
112112
</article>
113113
<article id="text__lists">
114114
<header>
115-
<h1>Lists</h1>
115+
<h2>Lists</h2>
116116
</header>
117117
<div>
118-
<h3>Definition list</h3>
118+
<h4>Definition list</h4>
119119
<dl>
120120
<dt>Definition List Title</dt>
121121
<dd>This is a definition list division.</dd>
122122
</dl>
123-
<h3>Ordered List</h3>
123+
<h4>Ordered List</h4>
124124
<ol>
125125
<li>List Item 1</li>
126126
<li>List Item 2</li>
127127
<li>List Item 3</li>
128128
</ol>
129-
<h3>Unordered List</h3>
129+
<h4>Unordered List</h4>
130130
<ul>
131131
<li>List Item 1</li>
132132
<li>List Item 2</li>
@@ -139,7 +139,7 @@ <h3>Unordered List</h3>
139139
</article>
140140
<article id="text__hr">
141141
<header>
142-
<h1>Horizontal rules</h1>
142+
<h2>Horizontal rules</h2>
143143
</header>
144144
<div>
145145
<hr>
@@ -150,7 +150,7 @@ <h1>Horizontal rules</h1>
150150
</article>
151151
<article id="text__tables">
152152
<header>
153-
<h1>Tabular data</h1>
153+
<h2>Tabular data</h2>
154154
</header>
155155
<table>
156156
<caption>Table Caption</caption>
@@ -209,13 +209,13 @@ <h1>Tabular data</h1>
209209
</article>
210210
<article id="text__code">
211211
<header>
212-
<h1>Code</h1>
212+
<h2>Code</h2>
213213
</header>
214214
<div>
215215
<p><strong>Keyboard input:</strong> <kbd>Cmd</kbd></p>
216216
<p><strong>Inline code:</strong> <code>&lt;div&gt;code&lt;/div&gt;</code></p>
217217
<p><strong>Sample output:</strong> <samp>This is sample output from a computer program.</samp></p>
218-
<h2>Pre-formatted text</h2>
218+
<h3>Pre-formatted text</h3>
219219
<pre>P R E F O R M A T T E D T E X T
220220
! " # $ % &amp; ' ( ) * + , - . /
221221
0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ?
@@ -230,7 +230,7 @@ <h2>Pre-formatted text</h2>
230230
</article>
231231
<article id="text__inline">
232232
<header>
233-
<h1>Inline elements</h1>
233+
<h2>Inline elements</h2>
234234
</header>
235235
<div>
236236
<p><a href="#!">This is a text link</a>.</p>
@@ -261,7 +261,7 @@ <h1>Inline elements</h1>
261261
</article>
262262
<article id="text__comments">
263263
<header>
264-
<h1>HTML Comments</h1>
264+
<h2>HTML Comments</h2>
265265
</header>
266266
<div>
267267
<p>There is comment here:
@@ -279,20 +279,20 @@ <h1>HTML Comments</h1>
279279
</section>
280280
<section id="embedded">
281281
<header>
282-
<h1>Embedded content</h1>
282+
<h2>Embedded content</h2>
283283
</header>
284284
<article id="embedded__images">
285285
<header>
286-
<h2>Images</h2>
286+
<h3>Images</h3>
287287
</header>
288288
<div>
289-
<h3>No <code>&lt;figure&gt;</code> element</h3>
289+
<h4>No <code>&lt;figure&gt;</code> element</h4>
290290
<p><img src="https://picsum.photos/seed/elems-1/1000/600" alt="Image alt text" width="750" height="400">
291291
</p>
292-
<h3>Wrapped in a <code>&lt;figure&gt;</code> element, no <code>&lt;figcaption&gt;</code></h3>
292+
<h4>Wrapped in a <code>&lt;figure&gt;</code> element, no <code>&lt;figcaption&gt;</code></h4>
293293
<figure><img src="https://picsum.photos/seed/elems-2/600/400" alt="Image alt text" width="600"
294294
height="400"></figure>
295-
<h3>Wrapped in a <code>&lt;figure&gt;</code> element, with a <code>&lt;figcaption&gt;</code></h3>
295+
<h4>Wrapped in a <code>&lt;figure&gt;</code> element, with a <code>&lt;figcaption&gt;</code></h4>
296296
<figure>
297297
<img src="https://picsum.photos/seed/elems-3/600/800" alt="Image alt text" width="600" height="800">
298298
<figcaption>Here is a caption for this image.</figcaption>
@@ -304,7 +304,7 @@ <h3>Wrapped in a <code>&lt;figure&gt;</code> element, with a <code>&lt;figcaptio
304304
</article>
305305
<article id="embedded__audio">
306306
<header>
307-
<h2>Audio</h2>
307+
<h3>Audio</h3>
308308
</header>
309309
<div><audio controls="">audio</audio></div>
310310
<footer>
@@ -313,7 +313,7 @@ <h2>Audio</h2>
313313
</article>
314314
<article id="embedded__video">
315315
<header>
316-
<h2>Video</h2>
316+
<h3>Video</h3>
317317
</header>
318318
<div><video controls="">video</video></div>
319319
<footer>
@@ -322,7 +322,7 @@ <h2>Video</h2>
322322
</article>
323323
<article id="embedded__canvas">
324324
<header>
325-
<h2>Canvas</h2>
325+
<h3>Canvas</h3>
326326
</header>
327327
<div><canvas>canvas</canvas></div>
328328
<footer>
@@ -331,7 +331,7 @@ <h2>Canvas</h2>
331331
</article>
332332
<article id="embedded__meter">
333333
<header>
334-
<h2>Meter</h2>
334+
<h3>Meter</h3>
335335
</header>
336336
<div><meter value="2" min="0" max="10">2 out of 10</meter></div>
337337
<footer>
@@ -340,7 +340,7 @@ <h2>Meter</h2>
340340
</article>
341341
<article id="embedded__progress">
342342
<header>
343-
<h2>Progress</h2>
343+
<h3>Progress</h3>
344344
</header>
345345
<div><progress>progress</progress></div>
346346
<footer>
@@ -349,7 +349,7 @@ <h2>Progress</h2>
349349
</article>
350350
<article id="embedded__svg">
351351
<header>
352-
<h2>Inline SVG</h2>
352+
<h3>Inline SVG</h3>
353353
</header>
354354
<div><svg width="100px" height="100px">
355355
<circle cx="100" cy="100" r="100" fill="#1fa3ec"></circle>
@@ -360,7 +360,7 @@ <h2>Inline SVG</h2>
360360
</article>
361361
<article id="embedded__iframe">
362362
<header>
363-
<h2>IFrame</h2>
363+
<h3>IFrame</h3>
364364
</header>
365365
<div><iframe src="index.html" height="300"></iframe></div>
366366
<footer>
@@ -370,7 +370,7 @@ <h2>IFrame</h2>
370370
</section>
371371
<section id="forms">
372372
<header>
373-
<h1>Form elements</h1>
373+
<h2>Form elements</h2>
374374
</header>
375375
<form>
376376
<fieldset id="forms__input">

0 commit comments

Comments
 (0)