-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhtml5elements.htm
More file actions
566 lines (541 loc) · 21.9 KB
/
Copy pathhtml5elements.htm
File metadata and controls
566 lines (541 loc) · 21.9 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5 Elements</title>
<meta name="description" content="An example HTML5 document" />
<meta name="keywords" content="HTML5, template, elements" />
<!-- Internal CSS -->
<style type="text/css">
/*article, aside, dialog, figure, footer, header, hgroup, menu, nav, section {
display: block;
} */
#list1, #list2, #list3 {
display:none;
}
form {
font:100% Lucinda Grande, Sans-serif;
margin: 0;
padding: 0;
width: 20em;
padding: .5em;
}
.entry {
margin-bottom:.5em;
}
label {
color:#666666;
float: left;
width: 130px;
padding: 0;
text-align: right;
}
input, textarea {
margin-left:5px;
}
input {width:6em}
.button {
padding-left:140px;
padding-bottom:5px;
padding-top:5px;
}
input:required {
outline: 1px red solid;
color:red;
}
menu {display:block}
</style>
<!-- Learn more about the following CSS setup here:
Optimizing websites for iPhone and Android
http://www.rkblog.rk.edu.pl/w/p/optimizing-websites-iphone-and-android/
See individual CSS files below for ideas and references.
-->
<link href="assets/css/print.css" media="print" rel="stylesheet" type="text/css" />
<link href="assets/css/screen.css" media="screen and (min-device-width: 481px)" rel="stylesheet" type="text/css" />
<link href="assets/css/smart.css" media="only screen and (max-device-width: 480px)" rel="stylesheet" type="text/css" />
<link href="assets/css/mobile.css" media="handheld" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link rel="stylesheet" href="assets/css/screen.css" media="screen" type="text/css" />
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- tell iPhone not to shrink mobile website -->
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<!-- jQuery provided by Google -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<!-- Local Scroll effect -->
<script src="assets/js/jquery.localscroll-1.2.7-min.js" type="text/javascript"></script>
<script src="assets/js/jquery.scrollTo-1.4.2-min.js" type="text/javascript"></script>
<!-- Simple collapsible menus for lists of elements found in the aside -->
<script type="text/javascript">
$(document).ready(function(){
$("#toggle1").click(function(){
$("#list1").slideToggle();
return false;
});
$("#toggle2").click(function(){
$("#list2").slideToggle();
return false;
});
$("#toggle3").click(function(){
$("#list3").slideToggle();
return false;
});
// Local Scroll effect
$.localScroll({
duration:1000,
hash:true,
});
});
</script>
</head>
<body>
<noscript>
<!-- Specify what happens if the user has JavaScript disabled. For example, you may want to display the lists in the right column instead of hiding them by default. -->
</noscript>
<div id="wrap">
<header>
<hgroup>
<!-- Example comment: Add valid elements within header group -->
<h1>HTML5 Elements</h1>
<p><a href="http://www.html5accessibility.com">home</a></p>
</hgroup>
<p>This is the global <code><header></code> element for this page, including the <code><hgroup></code> and <code><nav></code> elements.</p>
<nav>
<ul>
<li><a href="#" title="Global header link">Global <code><nav></code> link within the <code><header></code></a></li>
<li><a href="#" title="Global header link">Global <code><nav></code> link within the <code><header></code></a></li>
<li><a href="#" title="Global header link">Global <code><nav></code> link within the <code><header></code></a></li>
</ul>
</nav>
</header>
<section>
<header>
<h2>Section header</h2>
</header>
<article>
<header>
<h3>Article header</h3>
</header>
<div>
<p><a href="http://www.ackernaut.com/space-station/zip/html5-elements.zip" title="Download the HTML and asset files">Download the HTML and asset files</a> <br>
(ZIP does not include audio or video to reduce file size. <br>
You can download them from this page using your browser.)</p>
<h4>Purpose of this document:</h4>
<ul>
<li>Includes all the HTML5 elements as listed in the side column. </li>
<li>Minimal styling has been used. Use this document to test CSS files (base, reset, custom, etc.) on desired elements in various browsers.</li>
<li>Use this document to create comprehensive templates that need to use many of the common HTML5 elements.</li>
<li>Includes jQuery because it comes in handy.</li>
<li>Includes HTML5 compatibility for Internet Explorer.</li>
<li>Includes CSS files for screen, print, mobile and smart phones.</li>
<li>See <a href="#info" title="Reference links below">reference links below</a> for more information.</li>
<li>This page validates as HTML5.</li>
</ul>
<p><span>Note:</span> This is only a guide — a starting point — if you will.</p>
<hr>
<h1>Header 1 <h1></h1>
<p>This is an example paragraph used within this article for this document.</p>
<h2>Header 2 <h2></h2>
<p>This is an example paragraph used within this article for this document.</p>
<h3>Header 3 <h3></h3>
<p>This is an example paragraph used within this article for this document.</p>
<h4>Header 1 <h4></h4>
<p>This is an example paragraph used within this article for this document.</p>
<h5>Header <h5></h5>
<p>This is an example paragraph used within this article for this document.</p>
<h6>Header <h6></h6>
<p>This is an example paragraph used within this article for this document.</p>
<hr>
<h4>Unordered list</h4>
<ul>
<li>Unordered list item</li>
<li>Unordered list item
<ul>
<li>Unordered list item</li>
<li>Unordered list item
<ul>
<li>Unordered list item</li>
<li>Unordered list item</li>
<li>Unordered list item</li>
</ul>
</li>
<li>Unordered list item</li>
</ul>
</li>
<li>Unordered list item</li>
</ul>
<h4>Ordered list</h4>
<ol>
<li>Ordered list item</li>
<li>Ordered list item
<ol>
<li>Ordered list item</li>
<li>Ordered list item
<ol>
<li>Ordered list item</li>
<li>Ordered list item</li>
<li>Ordered list item</li>
</ol>
</li>
<li>Ordered list item</li>
</ol>
</li>
<li>Ordered list item</li>
</ol>
<hr>
<h4>Address and blockquote:</h4>
<address>
700 Address Element Road<br>
Town, State Zip
</address>
<blockquote>This is a blockquote.</blockquote>
<hr>
<h4>Audio and video:</h4>
<p>Example of the <code><audio></code> element:</p>
<audio controls autobuffer tabindex="0" role="application" title="audio">
<source src="assets/audio/1.mp3">
<source src="assets/audio/kahvi285d_jim_black-yoctosecond.ogg">
<!-- Find the audio file here: http://www.kahvi.org/releases.php?release_number=285 -->
Your browser does not support OGG audio. Try using Safari, Chrome or Firefox.</audio>
<p>Example of the <code><video></code> element:</p>
<video width="400" height="300" src="assets/video/a-new-computer-small.ogg" controls autobuffer tabindex="0"></video>
<p>Example of the <code><video></code> element for IE9:</p>
<video src="assets/video/IE9_HTML5_8000k.mp4" width="400" height="300" controls AUTOBUFFER tabindex="0"></video>
<hr>
<h4>Figure:</h4>
<figure>
<p>Use an <code><img></code>, <code><video></code> or <code><table></code> as content for the <code><figure></code> element.</p>
<img src="assets/img/sky.jpg" width="240" height="160" alt="Watching the Sky by Nathaniel Reinhart"><br>
<figcaption><a href="http://www.flickr.com/photos/0mega/3178584649/" title="Watching the Sky by Nathaniel Reinhart">Watching the Sky</a> by Nathaniel Reinhart (<code><figcaption></code>)</figcaption>
</figure>
<hr>
<h4>Form:</h4>
<form>
<fieldset>
<legend>Form legend</legend>
<div class="entry">
<label for="form-1">Text (required & autofocus) </label><br>
<input id="form-1" name="haha" type="text" autofocus required>
</div>
<div class="entry">
<label for="form-1a">Text with place holder</label><br>
<input id="form-1a" name="hah" type="text" placeholder="place holder">
</div>
<!-- entry end -->
<div class="entry">
<label for="form-2">Text with Datalist</label>
<input id="form-2" list="mylist" type="text">
<datalist id="mylist">
<option label="Mr" value="Mr">
<option label="Ms" value="Ms">
<option label="Prof" value="Mad Professor">
</datalist>
</div>
<!-- entry end -->
<div class="entry">
<label for="form-4">Number</label>
<input id="form-4" name="age" type="number" min="18" max="25">
</div>
<!-- entry end -->
<div class="entry">
<label for="form-5">Email</label>
<input id="form-5" name="email" type="email">
</div>
<!-- entry end -->
<div class="entry">
<label for="form-6">URL</label>
<input id="form-6" name="url" type="url">
</div>
<!-- entry end -->
<div class="entry">
<label for="form-7">Date</label>
<input id="form-7" name="dob" type="date">
</div>
<div class="entry">
<label for="form-8">Date Time</label>
<input id="form-8" name="dt" type="datetime">
</div>
<div class="entry">
<label for="form-9">Date Time-local</label>
<input id="form-9" name="dtl" type="datetime-local">
</div>
<div class="entry">
<label for="form-10">Month</label>
<input id="form-10" name="m" type="month">
</div>
<div class="entry">
<label for="form-11">Time</label>
<input id="form-11" name="t" type="time">
</div>
<div class="entry">
<label for="form-12">Week</label>
<input id="form-12" name="w" type="week">
</div>
<div class="entry">
<label for="form-13">Telephone</label>
<input id="form-13" name="tel" type="tel">
</div>
<!-- entry end -->
<div class="entry">
<label for="form-14">Range</label>
<input id="form-14" name="a" type="range" min="1" max="10" value="0">
output: <output name="result" onforminput="value=a.value" aria-live="polite">0</output>
</div>
<div class="entry">
<label for="form-15">Color</label>
<input id="form-15" name="tel" type="color">
</div>
<!-- entry end -->
<div class="button">
<button type=submit>Submit</button>
</div>
</fieldset>
</form>
<hr>
<h4>Menu type="toolbar" with command elements type="radio" and type="command"</h4>
<menu type="toolbar">
<command type="radio" radiogroup="alignment" checked="checked"
label="Left" icon="icons/alL.png" onclick="setAlign('left')">
<command type="radio" radiogroup="alignment"
label="Center" icon="icons/alC.png" onclick="setAlign('center')">
<command type="radio" radiogroup="alignment"
label="Right" icon="icons/alR.png" onclick="setAlign('right')">
<command type="command" disabled
label="Publish" icon="icons/pub.png" onclick="publish()">
</menu>
<hr>
<h4>Progress</h4>
<p>Progress: <progress id="p" max=100 value="50" tabindex="0"><span>50</span>%</progress></p>
<hr>
<h4>KeyGen</h4>
<p><keygen name="key"></p>
<hr>
<h4>Inline text formatting:</h4>
<p>This is the <abbr title="Abbreviation">ABBR</abbr> element.</p>
<p>This is the <b>b</b> element.</p>
<p>This is the <cite>cite</cite> element.</p>
<p>This is the <code>code</code> element.</p>
<p>This is the <del>del</del> element.</p>
<p>This is the <dfn>dfn</dfn> element.</p>
<p>This is the <em>em</em> element.</p>
<p>This is the <i>i</i> element.</p>
<p>This is the <ins>ins</ins> element.</p>
<p>This is the <kbd>kbd</kbd> element.</p>
<p>This is the
<mark>mark</mark>
element.</p>
<p>This is the <samp>samp</samp> element.</p>
<p>This is the <small>small</small> element.</p>
<p>This is the <strong>strong</strong> element.</p>
<p>This is the <sub>sub</sub> element.</p>
<p>This is the <sup>sup</sup> element.</p>
<p>This is the <var>var</var> element.</p>
<hr>
<h4>Meter:</h4>
<p>An example of the <code><meter></code> element: Your score is:
<meter value="91" min="0" max="100" low="40" high="90" optimum="100" tabindex="0">A+</meter>
</p>
<hr>
<h4>Pre and span:</h4>
<p>This is the <code><pre></code> element:</p>
<pre>pre</pre>
<p>This is the <span>span</span> element. All <code><span></code> elements within this demo are set to <span>bold</span> for styling purposes only.</p>
<hr>
<h4>Table:</h4>
<table>
<thead>
<tr>
<th>Table header</th>
<th>Table header</th>
<th>Table header</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Table footer</td>
<td>Table footer</td>
<td>Table footer</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Table data</td>
<td>Table data</td>
<td>Table data</td>
</tr>
</tbody>
</table>
<hr>
<h4>Time:</h4>
<p>The following is an example of the <code><time></code> element:</p>
<time datetime="2010-03-22T11:00-06:00">11AM in Texas on March 22, 2010</time>
</div>
<hr>
<h4>Hidden content (hidden attribute)</h4>
<p hidden>this should not be displayed. This <a href="#">link</a> should not be in the tab order</p>
<hr>
<footer class="article">
<p>This is the <code><footer></code> for this <code><article></code>.</p>
<h4><a id="info"></a>Details and summary:</h4>
<details>
<summary>Article Summary</summary>
<p>Details: some useful links to HTML5 and related specification documents. This uses the <code><details></code> and <code><summary></code> elements.</p>
<ul>
<li><a href="http://dev.w3.org/html5/spec/Overview.html">W3C HTML5 specification</a></li>
<li><a href="http://dev.w3.org/html5/markup/">HTML: the markup language reference</a></li>
<li><a href="http://dev.w3.org/html5/rdfa/">HTML + RDFa</a></li>
<li><a href="http://dev.w3.org/html5/md/">HTML Microdata</a></li>
<li><a href="http://dev.w3.org/html5/2dcontext/">HTML canvas 2d context</a></li>
<li><a href="http://www.w3.org/html/wg/html5/diff/">HTML5 differences from HTML 4</a></li>
<li><A href="http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html">HTML/XHTML Compatibility Authoring Guidelines</A></li>
<li><A href="http://dev.w3.org/html5/alt-techniques/">HTML5: Techniques for providing useful text alternatives</A><BR>
</li>
</ul>
</details>
</footer>
</article>
<footer>
<p>This is the <code><footer></code> for this <code><section> of this page/site</code>.</p>
</footer>
</section>
<aside>
<h3>The <code><aside></code> to the <code><section></code></h3>
<h4>Elements included in this demo:</h4>
<p><a id="toggle1" href="#" title="View / hide list of elements">View / hide</a> list of elements</p>
<p><span>Note:</span> Some elements are only used within the source code and not as examples.</p>
<ul id="list1">
<li><code><!-- Comments --></code></li>
<li><code><!DOCTYPE></code></li>
<li><code><a></code></li>
<li><code><abbr></code></li>
<li><code><address></code></li>
<li><code><article></code></li>
<li><code><aside></code></li>
<li><code><audio></code></li>
<li><code><b></code></li>
<li><code><blockquote></code></li>
<li><code><body></code></li>
<li><code><br></code></li>
<li><code><button></code></li>
<li><code><cite></code></li>
<li><code><code></code></li>
<li><code><del></code></li>
<li><code><details></code></li>
<li><code><dfn></code></li>
<li><code><div></code></li>
<li><code><em></code></li>
<li><code><fieldset></code></li>
<li><code><figcaption></code></li>
<li><code><figure></code></li>
<li><code><footer></code></li>
<li><code><form></code></li>
<li><code><h1></code> – <code><h6></code></li>
<li><code><head></code></li>
<li><code><header></code></li>
<li><code><hgroup></code></li>
<li><code><hr></code></li>
<li><code><html></code></li>
<li><code><i></code></li>
<li><code><img></code></li>
<li><code><input></code></li>
<li><code><ins></code></li>
<li><code><kbd></code></li>
<li><code><label></code></li>
<li><code><legend></code></li>
<li><code><li></code></li>
<li><code><link></code></li>
<li><code><mark></code></li>
<li><code><meta></code></li>
<li><code><meter></code></li>
<li><code><nav></code></li>
<li><code><noscript></code></li>
<li><code><ol></code></li>
<li><code><optgroup></code></li>
<li><code><option></code></li>
<li><code><p></code></li>
<li><code><pre></code></li>
<li><code><q></code></li>
<li><code><samp></code></li>
<li><code><script></code></li>
<li><code><section></code></li>
<li><code><select></code></li>
<li><code><small></code></li>
<li><code><source></code></li>
<li><code><span></code></li>
<li><code><strong></code></li>
<li><code><style></code></li>
<li><code><sub></code></li>
<li><code><summary></code></li>
<li><code><sup></code></li>
<li><code><table></code></li>
<li><code><tbody></code></li>
<li><code><td></code></li>
<li><code><textarea></code></li>
<li><code><tfoot></code></li>
<li><code><th></code></li>
<li><code><thead></code></li>
<li><code><time></code></li>
<li><code><title></code></li>
<li><code><tr></code></li>
<li><code><ul></code></li>
<li><code><var></code></li>
<li><code><video></code></li>
</ul>
<h4>Elements not included in this demo:</h4>
<p><a id="toggle2" href="#" title="View / hide list of elements">View / hide</a> list of elements</p>
<ul id="list2">
<li><code><area></code></li>
<li><code><base></code></li>
<li><code><bdo></code></li>
<li><code><canvas></code></li>
<li><code><caption></code></li>
<li><code><col></code></li>
<li><code><colgroup></code></li>
<li><code><dd></code></li>
<li><code><dl></code></li>
<li><code><dt></code></li>
<li><code><embed></code></li>
<li><code><iframe></code></li>
<li><code><map></code></li>
<li><code><object></code></li>
<li><code><param></code></li>
<li><code><rp></code></li>
<li><code><rt></code></li>
<li><code><ruby></code></li>
</ul>
<h4>Elements not supported by HTML5:</h4>
<p><a id="toggle3" href="#" title="View / hide list of elements">View / hide</a> list of elements</p>
<ul id="list3">
<li><code><acronym></code></li>
<li><code><applet></code></li>
<li><code><basefont></code></li>
<li><code><big></code></li>
<li><code><center></code></li>
<li><code><dir></code></li>
<li><code><font></code></li>
<li><code><frame></code></li>
<li><code><frameset></code></li>
<li><code><noframes></code></li>
<li><code><s></code></li>
<li><code><strike></code></li>
<li><code><tt></code></li>
<li><code><u></code></li>
<li><code><xmp></code></li>
</ul>
</aside>
<footer>
<p>This is the global <code><footer></code> for this page/site.</p>
<nav>
<ul>
<li><a href="#" title="Global footer link">Global footer <code><nav></code> link</a></li>
<li><a href="#" title="Global footer link">Global footer <code><nav></code> link</a></li>
<li><a href="#" title="Global footer link">Global footer <code><nav></code> link</a></li>
</ul>
</nav>
<p>This document is a modified version of the document prepared by <a href="http://www.ackernaut.com/" title="the Ackernaut">the Ackernaut</a> for the benefit of the web development community. <br>
If you have suggestions on how to improve this page let him know: terry / at / ackernaut / dot / com<br>
Feel free to borrow and share a link! <br></p>
</footer>
</div>
</body>
</html>