-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample-html.html
executable file
·568 lines (510 loc) · 30.6 KB
/
sample-html.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
---
layout: page
nav-title: HTML Elements
title: Sample HTML Elements
permalink: sample-html/
body-class: sample-html
---
<h1 id="menu">Style Guide and Sample Code</h1>
<p><strong>These are basic markup and typographic styles for your site and how to use them.</strong> Most of these options are available through the TinyMCE edit window in the admin, but some will require knowledge of coding HTML. </p>
<!-- Menu -->
<ul>
<li><a href="#headings">Headings</a></li>
<li><a href="#grouping">Grouping</a></li>
<li><a href="#text">Text Semantic Elements</a></li>
<li><a href="#tables">Table Example</a></li>
<li><a href="#form">Form Example</a></li>
</ul>
<!-- Headings -->
<h1 id="headings">Heading 1 <a href="#">with a Link</a></h1>
<p>The primary header is an <code><h1></code> element. Any header elements may include links, as depicted in the example. More than one of any type may be used per page. All of the headings follow a similar markup pattern:</p>
<h2>Second-Level Header <a href="#">with a Link</a></h2>
<p>The secondary header is an <code><h2></code> element, which may be used for any form of important page-level header. More than one may be used per page. Consider using an <code>h2</code> as a sub-header to the page title or an existing <code>h1</code> element.</p>
<h3>Third-Level Header <a href="#">with a Link</a></h3>
<p>The header above is an <code><h3></code> element, which may be used for any form of page-level header which falls below the <code>h2</code> header in a document hierarchy.</p>
<h4>Fourth-Level Header <a href="#">with a Link</a></h4>
<p>The header above is an <code><h4></code> element, which may be used for any form of page-level header which falls below the <code>h3</code> header in a document hierarchy.</p>
<h5>Fifth-Level Header <a href="#">with a Link</a></h5>
<p>The header above is an <code><h5></code> element, which may be used for any form of page-level header which falls below the <code>h4</code> header in a document hierarchy.</p>
<h6>Sixth-Level Header <a href="#">with a Link</a></h6>
<p>The header above is an <code><h6></code> element, which may be used for any form of page-level header which falls below the <code>h5</code> header in a document hierarchy.</p>
<!-- Groupings -->
<h1 id="grouping">Grouping content</h1>
<h3>Paragraphs</h3>
<div class="example">
<p>All paragraphs are wrapped in <code><p></code> tags. Additionally, <code><p></code> elements can be wrapped with a <code><blockquote></code> element <em>if the <code>p</code> element is indeed a quote</em>. Historically, <code>blockquote</code> has been used purely to force indents, but this is now achieved using CSS. Reserve <code>blockquote</code> for quotes.</p>
</div>
<pre class="examplecode"><code><p>This is a paragraph</p></code></pre>
<h3 id="blockquotes">Blockquotes</h3>
<p>The <code>blockquote</code> element represents a section that is being quoted from another source. In this example, we also follow the blockquote with a <code>cite</code> element containing a link to the quoted source.</p>
<div class="example">
<blockquote cite="http://hansard.millbanksystems.com/commons/1947/nov/11/parliament-bill#column_206">
<p>Many forms of Government have been tried, and will be tried in this world of sin and woe. No one pretends that democracy is perfect or all-wise. Indeed, it has been said that democracy is the worst form of government except all those other forms that have been tried from time to time.</p>
</blockquote>
<p>— <cite><a href="http://hansard.millbanksystems.com/commons/1947/nov/11/parliament-bill#column_206" target="_blank">Parliament Bill 1947, Column 206</a></cite></p>
</div>
<pre class="examplecode"><code><blockquote cite="optional link to source material">
<p>Quoted text</p>
</blockquote">
<p>— <cite><a href="optional link to source material">Source of the Quote</a></cite></p></code></pre>
<hr />
<h3 id="hr">Horizontal rule</h3>
<p>The <code>hr</code> element (seen above and below) represents a paragraph-level thematic break, e.g. a scene change in a story, or a transition to another topic within a section of a reference book. </p>
<hr />
<h3 id="pre">Pre-formatted text</h3>
<p>The <code>pre</code> element represents a block of pre-formatted text, in which structure is represented by typographic conventions rather than by elements. Such examples are an e-mail (with paragraphs indicated by blank lines, lists indicated by lines prefixed with a bullet), fragments of computer code (with structure indicated according to the conventions of that language) or displaying <abbr title="American Standard Code for Information Interchange">ASCII</abbr> art. Here’s an example showing the printable characters of <abbr>ASCII</abbr>:</p>
<pre><code> ! " # $ % & ' ( ) * + , - . /
0 1 2 3 4 5 6 7 8 9 : ; < = < ?
@ A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \ ] ^ _
` a b c d e f g h i j k l m n o
p q r s t u v w x y z { | } ~</code></pre>
<h3 id="ol">Ordered list</h3>
<p>The <code><ol></code> element denotes an ordered list, and various numbering schemes are available through the CSS (including 1,2,3… a,b,c… i,ii,iii… and so on). Each item requires a surrounding <code><li></code> tag to denote individual items within the list (as you may have guessed, <code>li</code> stands for list item).</p>
<div class="example">
<ol>
<li>This is an ordered list.</li>
<li>
This is the second item, which contains a sub list
<ol>
<li>This is the sub list, which is also ordered.</li>
<li>It has two items.</li>
</ol>
</li>
<li>This is the final item on this list.</li>
</ol>
</div>
<pre class="examplecode"><code><ol>
<li>List item one</li>
<li>List item two
<ol>
<li>Nested list item one</li>
<li>Nested list item two</li>
</ol>
</li>
</ol></code></pre>
<h3 id="ul">Unordered list</h3>
<p>The <code><ul></code> element denotes an unordered list (ie. a list of loose items that don’t require numbering, as a bulleted list). Again, each item requires a surrounding <code><li></code> tag to denote individual items. Here is an example list showing the constituent parts of the British Isles:</p>
<div class="example">
<ul>
<li>
United Kingdom of Great Britain and Northern Ireland:
<ul>
<li>
England
<ul><li>Another nested list</li><li>Yet another nested line item</li></ul>
</li>
<li>Scotland</li>
<li>Wales</li>
<li>Northern Ireland</li>
</ul>
</li>
<li>Republic of Ireland</li>
<li>Isle of Man</li>
<li>
Channel Islands:
<ul>
<li>Bailiwick of Guernsey</li>
<li>Bailiwick of Jersey</li>
</ul>
</li>
</ul>
</div>
<pre class="examplecode"><code><ul>
<li>List item one</li>
<li>List item two
<ul>
<li>Nested list item one</li>
<li>Nested list item two</li>
</ul>
</li>
</ul></code></pre>
<h3 id="dl">Definition list</h3>
<p>The <code><dl></code> element is for another type of list called a definition list. Instead of list items, the content of a <code>dl</code> consists of <code><dt></code> (Definition Term) and <code><dd></code> (definition description) pairs. Though it may be called a “definition list”, <code>dl</code> can apply to other scenarios where a parent/child relationship is applicable. For example, it may be used for marking up dialogues, with each <code>dt</code> naming a speaker, and each <code>dd</code> containing his or her words.</p>
<div class="example">
<dl>
<dt>This is a term.</dt>
<dd>This is the definition of that term, which both live in a <code>dl</code>.</dd>
<dt>Here is another term.</dt>
<dd>And it gets a definition too, which is this line.</dd>
<dt>Here is term that shares a definition with the term below.</dt>
<dt>Here is a defined term.</dt>
<dd><code>dt</code> terms may stand on their own without an accompanying <code>dd</code>, but in that case they <em>share</em> descriptions with the next available <code>dt</code>. You may not have a <code>dd</code> without a parent <code>dt</code>.</dd>
</dl>
</div>
<pre class="examplecode"><code><dl>
<dt>Definition term</dt>
<dd>Definition</dd>
<dt>Definition term</dt>
<dt>Another definition term</dt>
<dd>Definition of both terms above</dd>
</dl></code></pre>
<h3 id="figure">Figures</h3>
<p>Figures are usually used to refer to images. They can also be used to wrap a Blockquote, which can be quite nice semantics:</p>
<div class="example">
<figure>
<img src="http://placekitten.com/720/300" alt="The internet loves kittens">
<figcaption>This is a placekitten image, with supporting caption.</figcaption>
</figure>
</div>
<pre class="examplecode"><code><figure>
<img src="link/to/image" alt="Alt text displayed when image does not load">
<figcaption>This is a placekitten image, with supporting caption.</figcaption>
</figure></code></pre>
<p>Here, a part of a poem is marked up using figure. A <code>cite</code> element surrounds the name of the text source:</p>
<div class="example">
<figure>
<p>‘Twas brillig, and the slithy toves<br>
Did gyre and gimble in the wabe;<br>
All mimsy were the borogoves,<br>
And the mome raths outgrabe.</p>
<figcaption>
<cite>Jabberwocky</cite> (first verse). Lewis Carroll, 1832-98
</figcaption>
</figure>
</div>
<pre class="examplecode"><code><figure>
<p>‘Twas brillig, and the slithy toves</p>
<figcaption><cite>Jabberwocky</cite> (first verse). Lewis Carroll, 1832-98</figcaption>
</figure></code></pre>
<p><a href="#menu">Back to Top ↑</a></p>
<!-- Text semantics -->
<h1 id="text">Text-level Semantics</h1>
<p>There are a number of inline <abbr title="HyperText Markup Language">HTML</abbr> elements you may use anywhere within other elements. The semantics of the markup used is as important as how it looks, as web crawlers will not process CSS, but rather infer hierarchy and emphasis from the HTML elements being used. </p>
<h3 id="anchor">Links and anchors</h3>
<p>The <code><a></code> element is used to hyperlink text, be that to another page, a named fragment (also referred to as an “anchor”) on the current page, or any other location on the web. Example:</p>
<div class="example">
<p><a href=".">Go to the home page</a> or <a href="#menu">return to the menu at the top of this page</a>.</p>
</div>
<pre class="examplecode"><code><a href="link/to/page">link text</a></code></pre>
<h3 id="em">Stressed emphasis</h3>
<p>The <code><em></code> element is used to denote text with stressed emphasis, i.e., something you’d pronounce differently. Example:</p>
<div class="example">
<p>You simply <em>must</em> try the negitoro maki!</p>
</div>
<pre class="examplecode"><code>You simply <em>must</em> try the negitoro maki!</code></pre>
<p>In HTML5, the older <code><i></code> element is still acceptable, and has taken on the form of styling something as an <code>em</code> would be styled, <em>without</em> adding the semantics of <code>em</code> for SEO.</p>
<h3 id="strong">Strong importance</h3>
<p>The <code><strong></code> element is used to denote text with strong importance. Example:</p>
<div class="example">
<p><strong>Do not under any circumstances</strong> stick nails in the electrical outlet.</p>
</div>
<pre class="examplecode"><code><strong>Do not under any circumstances</strong> stick nails in the electrical outlet.</code></pre>
<p>In HTML5, the older <code><b></code> element is still acceptable, and has taken on the form of styling something as an <code>strong</code> would be styled <em>without</em> adding the semantics of <code>strong</code> for SEO.</p>
<h3 id="small">Small print</h3>
<p>The <code><small></code> element is used to represent disclaimers, caveats, legal restrictions, or copyrights (commonly referred to as “fine print”). It can also be used for attributions or satisfying licensing requirements. Example:</p>
<div class="example">
<p>Order now, only $5.99! <small>Some restrictions may apply if you live in the continental United States.</small></p>
</div>
<pre class="examplecode"><code>Order now, only $5.99! <small>Some restrictions may apply.</small></code></pre>
<h3 id="strike">Strikethrough</h3>
<p>The <code><s></code> element is used to represent content that is no longer accurate or relevant. When indicating document edits — i.e., marking a span of text as having been removed from a document — use the <code><del></code> element instead (See <a href="#edits">Edits</a>). Example:</p>
<div class="example">
<p><s>Recommended retail price: $3.99 per bottle</s> Now selling for just $2.99 a bottle! </p>
</div>
<pre class="examplecode"><code><s>Recommended retail price: $3.99 per bottle</s> Now selling for just $2.99 a bottle!</code></pre>
<h3 id="super">Superscript and subscript text</h3>
<p>The <code><sup></code> element represents a superscript and the <code><sub></code> element represents a subscript. These elements must be used only to mark up typographical conventions with specific meanings, not for typographical presentation. As a guide, only use these elements if their absence would change the meaning of the content. Example:</p>
<div class="example">
<p>The coordinate of the <var>i</var>th point is (<var>x<sub><var>i</var></sub></var>, <var>y<sub><var>i</var></sub></var>). For example, the 10th point has coordinate (<var>x<sub>10</sub></var>, <var>y<sub>10</sub></var>).</p>
<p>If(<var>x</var>, <var>n</var>) = log<sub>4</sub><var>x</var><sup><var>n</var></sup></p>
</div>
<pre class="examplecode"><code>f(<var>x</var>, <var>n</var>) = log<sub>4</sub><var>x</var><sup><var>n</var></sup></code></pre>
<h3 id="site">Citations</h3>
<p>The <code><cite></code> element is used to represent the title of a work (e.g. a book, essay, poem, song, film, TV show, sculpture, painting, musical, exhibition, etc). This can be a work that is being quoted or referenced in detail (i.e. a citation), or it can just be a work that is mentioned in passing. Stylistically, it may be italicized, but does not have to be. Example:</p>
<div class="example">
<p><cite>Universal Declaration of Human Rights</cite>, United Nations, December 1948. Adopted by General Assembly resolution 217 A (III).</p>
</div>
<pre class="examplecode"><code><cite>Universal Declaration of Human Rights</cite>, United Nations, December 1948. Adopted by General Assembly resolution 217 A (III).</code></pre>
<h3 id="q">Inline quotes</h3>
<p>The <code><q></code> element is used for quoting text inline. Example showing nested quotations:</p>
<div class="example">
<p>John said, <q>I saw Lucy at lunch, she told me <q>Mary wants you to get some ice cream on your way home</q>. I think I will get some at Ben and Jerry’s, on Gloucester Road.</q></p>
</div>
<pre class="examplecode"><code>John said, <q>I saw Lucy at lunch, she told me <q>Mary wants you to get some ice cream on your way home</q>. I think I will get some at Ben and Jerry’s, on Gloucester Road.</q></code></pre>
<h3 id="def">Definition</h3>
<p>The <code><dfn></code> element is used to highlight the first use of a term. The <code>title</code> attribute can be used to describe the term, resulting in a browser “tooltip” when the mouse is hovered for more than a second. Example:</p>
<div class="example">
<p>Bob’s <dfn title="Dog">canine</dfn> mother and <dfn title="Horse">equine</dfn> father sat him down and carefully explained that he was an <dfn title="A mutation that combines two or more sets of chromosomes from different species">allopolyploid</dfn> organism.</p>
</div>
<pre class="examplecode"><code>Bob’s <dfn title="Dog">canine</dfn> mother and <dfn title="Horse">equine</dfn> father.</code></pre>
<h3 id="abbr">Abbreviation</h3>
<p>The <code><abbr></code> element is used for any abbreviated text, whether it be acronym, initialism, or otherwise. Generally, it’s less work and useful (enough) to mark up only the first occurrence of any particular abbreviation on a page, and ignore the rest. Any text in the <code>title</code> attribute will appear when the user’s mouse hovers the abbreviation (although notably, this does not work in Internet Explorer for Windows). Example abbreviations:</p>
<div class="example">
<p><abbr title="British Broadcasting Corportation">BBC</abbr>, <abbr title="HyperText Markup Language">HTML</abbr>, and <abbr title="Staffordshire">Staffs.</abbr> are common abbreviated terms. </p>
</div>
<pre class="examplecode"><code><abbr title="HyperText Markup Language">HTML</abbr>is a common abbreviated term</code></pre>
<!--
<h3 id="time">Time</h3>
<p>The <code>time</code> element is used to represent either a time on a 24 hour clock, or a precise date in the proleptic Gregorian calendar, optionally with a time and a time-zone offset. Example:</p>
<div class="example">
<p>Queen Elizabeth II was proclaimed sovereign of each of the Commonwealth realms on <time datetime="1952-02-6">6</time> and <time datetime="1952-02-7">7 February 1952</time>, after the death of her father, King George VI.</p>
</div>
-->
<h3 id="code">Code</h3>
<p>The <code><code></code> element is used to represent fragments of computer code. Useful for technology-oriented sites, not so useful otherwise. Example:</p>
<div class="example">
<p>When you call the <code>activate()</code> method on the <code>robotSnowman</code> object, the eyes glow.</p>
</div>
<pre class="examplecode"><code>When you call the <code>activate()</code> method</code></pre>
<h3 id="var">Variable</h3>
<p>The <code><var></code> element is used to denote a variable in a mathematical expression or programming context, but can also be used to indicate a placeholder where the contents should be replaced with your own value. Example:</p>
<div class="example">
<p>If there are <var>n</var> pipes leading to the ice cream factory then I expect at <em>least</em> <var>n</var> flavors of ice cream to be available for purchase!</p>
</div>
<pre class="examplecode"><code>If there are <var>n</var> pipes…</code></pre>
<h3 id="samp">Sample output</h3>
<p>The <code>samp</code> element is used to represent (sample) output from a program or computing system. Useful for technology-oriented sites, not so useful otherwise. Example:</p>
<div class="example">
<p>The computer said <samp>Too much cheese in tray two</samp> but I didn’t know what that meant.</p>
</div>
<pre class="examplecode"><code>The computer said <samp>Too much cheese</samp>…</code></pre>
<h3 id="kbd">Keyboard entry</h3>
<p>The <code><kbd></code> element is used to denote user input (typically via a keyboard, although it may also be used to represent other input methods, such as voice commands). Example:</p>
<div class="example">
<p>To take a screenshot on your Mac, press <kbd>⌘ Cmd</kbd> + <kbd>⇧ Shift</kbd> + <kbd>3</kbd>.</p>
</div>
<pre class="examplecode"><code>Press the <kbd>⌘ Cmd</kbd> key…</code></pre>
<h3 id="mark">Marked or highlighted text</h3>
<p>The <code><mark></code> element is used to represent a run of text marked or highlighted for reference purposes. When used in a quotation it indicates a highlight not originally present but added to bring the reader’s attention to that part of the text. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its relevance to the user’s current activity. Example:</p>
<div class="example">
<p>I also have some <mark>kitten</mark>s who are visiting me these days. They’re really cute. I think they like my garden! Maybe I should adopt a <mark>kitten</mark>.</p>
</div>
<pre class="examplecode"><code>Maybe I should adopt a <mark>kitten</mark></code></pre>
<h3 id="edits">Edits</h3>
<p>The <code><del></code> element is used to represent deleted or retracted text which still must remain on the page for some reason. Meanwhile its counterpart, the <code><ins></code> element, is used to represent inserted text. Both <code>del</code> and <code>ins</code> have a <code>datetime</code> attribute which allows you to include a timestamp directly in the element. Example inserted text and usage:</p>
<div class="example">
<p>She bought <del datetime="2005-05-30T13:00:00">two</del> <ins datetime="2005-05-30T13:00:00">five</ins> pairs of shoes.</p>
</div>
<pre class="examplecode"><code>She bought <del datetime="2005-05-30T13:00:00">two</del> <ins datetime="2005-05-30T13:00:00">five</ins> pairs of shoes.</code></pre>
<p><a href="#menu">Back to Top ↑</a></p>
<!-- Tables -->
<h1 id="tables">Tabular data</h1>
<p>Tables should be used when displaying tabular data. The <code><caption></code> element gives the table a title, while the <code><colgroup></code> and <code><col></code> elements help align columns. The <code><thead></code> and <code><tbody></code> elements enable you to group sets of rows within each a table — the <code>thead</code> and <code><th></code> elements should be used to denote a row of table headings. </p>
<div class="example">
<table class="table">
<caption>The Very Best Eggnog</caption>
<colgroup>
<col style="width:10%">
<col style="width:40%">
<col style="width:25%">
<col style="width:25%">
</colgroup>
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Ingredients</th>
<th scope="col">Serves 12</th>
<th scope="col">Serves 24</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Milk</td>
<td>1 quart</td>
<td>2 quart</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Cinnamon Sticks</td>
<td>2</td>
<td>1</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Vanilla Bean, Split</td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<th scope="row">4</th>
<td>Cloves</td>
<td>5</td>
<td>10</td>
</tr>
<tr>
<th scope="row">5</th>
<td>Mace</td>
<td>10 blades</td>
<td>20 blades</td>
</tr>
<tr>
<th scope="row">6</th>
<td>Egg Yolks</td>
<td>12</td>
<td>24</td>
</tr>
<tr>
<th scope="row">7</th>
<td>Cups Sugar</td>
<td>1 ½ cups</td>
<td>3 cups</td>
</tr>
<tr>
<th scope="row">8</th>
<td>Dark Rum</td>
<td>1 ½ cups</td>
<td>3 cups</td>
</tr>
<tr>
<th scope="row">9</th>
<td>Brandy</td>
<td>1 ½ cups</td>
<td>3 cups</td>
</tr>
<tr>
<th scope="row">10</th>
<td>Vanilla</td>
<td>1 tbsp</td>
<td>2 tbsp</td>
</tr>
<tr>
<th scope="row">11</th>
<td>Half-and-half or Light Cream</td>
<td>1 quart</td>
<td>2 quart</td>
</tr>
<tr>
<th scope="row">12</th>
<td>Freshly grated nutmeg to taste</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<pre class="examplecode"><code><table class="table">
<caption>The Very Best Eggnog</caption>
<colgroup>
<col style="width:10%">
<col style="width:40%">
<col style="width:25%">
<col style="width:25%">
</colgroup>
<thead>
<tr>
<th scope="col">Ingredients</th>
<th scope="col">Serves 12</th>
<th scope="col">Serves 24</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Milk</td>
<td>1 quart</td>
<td>2 quart</td>
</tr>
</tbody>
</table></code></pre>
<p><a href="#menu">Back to Top ↑</a></p>
<!-- Forms -->
<h1 id="form">Form Example</h1>
<p>Basic <code><form></code> container and inner common element styles</p>
<p>The <code><fieldset></code> element groups related fields within a form and should have a title attribute and a corresponding <code><legend></code>. The <code><label></code> element ensures field descriptions are associated with their corresponding form widgets, and are very important for form accesibility.</p>
<div class="example">
<form class="form">
<fieldset title="Sample input field types">
<legend class="form--legend">Input Field Types</legend>
<div class="form-group">
<label for="exampleText">Text Input</label>
<input id="exampleText" class="form-control" type="text" required="required" aria-describedby="textHelp" placeholder="Plain Text">
<small id="textHelp" class="form-text text-muted">This is a sample input field of type="text"</small>
</div>
<div class="form-group">
<label for="examplePassword">Password</label>
<input id="examplePassword" class="form-control" type="password" required="required" aria-describedby="passwordHelp" placeholder="At least 8 characters">
<small id="passwordHelp" class="form-text text-muted">This is a sample input field of type="password"</small>
</div>
<div class="form-group">
<label for="exampleEmail">Email Address</label>
<input id="exampleEmail" class="form-control" type="email" required="required" aria-describedby="emailHelp" placeholder="[email protected]">
<small id="emailHelp" class="form-text text-muted">This is a sample input field of type="email"</small>
</div>
<div class="form-group">
<label for="exampleUrl">Web Address</label>
<input id="exampleUrl" class="form-control" type="url" aria-describedby="urlHelp" placeholder="http://example.com">
<small id="urlHelp" class="form-text text-muted">This is a sample input field of type="url"</small>
</div>
<div class="form-group">
<label for="examplePhone">Phone Number (Tel)</label>
<input id="examplePhone" name="phone" class="form-control" type="tel" aria-describedby="telHelp" placeholder="000-000-0000">
<small id="telHelp" class="form-text text-muted">This is a sample input field of type="tel"</small>
</div>
<div class="form-group">
<label for="exampleNumber">Number String</label>
<input id="exampleNumber" name="number" class="form-control" type="number" aria-describedby="numberHelp" placeholder="1234567890">
<small id="numberHelp" class="form-text text-muted">This is a sample input field of type="number"</small>
</div>
<div class="form-group">
<label for="exampleTextarea">Textarea</label>
<textarea id="exampleTextarea" class="form-control" rows="4" aria-describedby="textareaHelp">Start typing your message…</textarea>
<small id="textareaHelp" class="form-text text-muted">This is a sample textarea for multi-line user input</small>
</div>
</fieldset>
<fieldset title="Selectable Option Items">
<legend>Selectable Option Items</legend>
<div class="form-group">
<label for="exampleSelect">Select</label>
<select id="exampleSelect" class="form-control" aria-describedby="selectHelp">
<optgroup label="Option Group">
<option value="">Option One</option>
<option value="">Option Two</option>
<option value="">Option Three</option>
</optgroup>
</select>
<small id="selectHelp" class="form-text text-muted">A select form element contains more than one <code><option></code> element</small>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
<label class="form-check-label" for="defaultCheck1">Default checkbox 1</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="defaultCheck2">
<label class="form-check-label" for="defaultCheck2">Default checkbox 2</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="defaultCheck3" disabled>
<label class="form-check-label" for="defaultCheck3">Disabled checkbox 3</label>
</div>
</div>
<p><small class="form-text text-muted">Checkboxes can be selected independently, and more than one can be selected</small></p>
<div class="form-group">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1" checked>
<label class="form-check-label" for="exampleRadios1">
Default radio
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="option2">
<label class="form-check-label" for="exampleRadios2">
Second default radio
</label>
</div>
<div class="form-check form-check-inline disabled">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios3" value="option3" disabled>
<label class="form-check-label" for="exampleRadios3">
Disabled radio
</label>
</div>
</div>
<p><small class="form-text text-muted">Radio buttons are inter-dependent, and usually only one can be chosen. This example also uses the <code>.form-check-inline</code> option. </small></p>
</fieldset>
<fieldset title="Buttons">
<legend>Button Types: input type="submit", <code><button></code>, input type="reset", <code><a>.button</code> and an <code><a></code></legend>
<p>
<input class="btn btn-primary" type="submit" id="submit" name="submit" value="Submit">
<button class="btn btn-secondary">Preview</button>
<input class="button" type="reset" id="reset" name="reset" value="Clear Form">
<a href="#" class="btn btn-dark" title="Cancel">Anchor as Button</a>
<a href="#" title="Cancel">Simple Anchor Link</a>
</p>
</fieldset>
</form>
</div>
<hr />
<p>There are all the styles that can be present inside the main content area with class <code>.typography</code>. Hope this helps you craft beautiful <strong>and semantic</strong> content</p>
<p><a href="#menu">Back to Top ↑</a></p>