-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtabular-data.html
More file actions
2546 lines (1798 loc) · 179 KB
/
Copy pathtabular-data.html
File metadata and controls
2546 lines (1798 loc) · 179 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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html lang="ja"><meta charset="utf-8"><title>4.9 テーブルデータ — HTML5 日本語訳</title><script src="link-fixup.js"></script>
<style type="text/css">
body {line-height:1.5;}
.applies thead th > * { display: block; }
.applies thead code { display: block; }
.applies tbody th { white-space: nowrap; }
.applies td { text-align: center; }
.applies .yes { background: yellow; }
.matrix, .matrix td { border: hidden; text-align: right; }
.matrix { margin-left: 2em; }
.dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
.dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
.dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
td.eg { border-width: thin; text-align: center; }
#table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; }
#table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; }
#table-example-1 caption { padding-bottom: 0.5em; }
#table-example-1 thead, #table-example-1 tbody { border: none; }
#table-example-1 th, #table-example-1 td { border: solid thin; }
#table-example-1 th { font-weight: normal; }
#table-example-1 td { border-style: none solid; vertical-align: top; }
#table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; }
#table-example-1 tbody tr:first-child td { padding-top: 0.5em; }
#table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; }
#table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; }
#table-example-1 tbody td { padding-left: 2em; padding-right: 2em; }
#table-example-1 tbody td:first-child + td { width: 10em; }
#table-example-1 tbody td:first-child + td ~ td { width: 2.5em; }
#table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; }
.apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; }
.apple-table-examples * { font-family: "Times", serif; }
.apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
.apple-table-examples tbody th:first-child { border-left: none; width: 100%; }
.apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; }
.apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; }
.apple-table-examples td { text-align: right; vertical-align: top; }
.apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; }
.apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; }
.apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
.apple-table-examples sup { line-height: 0; }
.details-example img { vertical-align: top; }
#base64-table {
white-space: nowrap;
font-size: 0.6em;
column-width: 6em;
column-count: 5;
column-gap: 1em;
-moz-column-width: 6em;
-moz-column-count: 5;
-moz-column-gap: 1em;
-webkit-column-width: 6em;
-webkit-column-count: 5;
-webkit-column-gap: 1em;
}
#base64-table thead { display: none; }
#base64-table * { border: none; }
#base64-table tbody td:first-child:after { content: ':'; }
#base64-table tbody td:last-child { text-align: right; }
#named-character-references-table {
white-space: nowrap;
font-size: 0.6em;
column-width: 30em;
column-gap: 1em;
-moz-column-width: 30em;
-moz-column-gap: 1em;
-webkit-column-width: 30em;
-webkit-column-gap: 1em;
}
#named-character-references-table > table > tbody > tr > td:first-child + td,
#named-character-references-table > table > tbody > tr > td:last-child { text-align: center; }
#named-character-references-table > table > tbody > tr > td:last-child:hover > span { position: absolute; top: auto; left: auto; margin-left: 0.5em; line-height: 1.2; font-size: 5em; border: outset; padding: 0.25em 0.5em; background: white; width: 1.25em; height: auto; text-align: center; }
#named-character-references-table > table > tbody > tr#entity-CounterClockwiseContourIntegral > td:first-child { font-size: 0.5em; }
.glyph.control { color: red; }
@font-face {
font-family: 'Essays1743';
src: url('fonts/Essays1743.ttf');
}
@font-face {
font-family: 'Essays1743';
font-weight: bold;
src: url('fonts/Essays1743-Bold.ttf');
}
@font-face {
font-family: 'Essays1743';
font-style: italic;
src: url('fonts/Essays1743-Italic.ttf');
}
@font-face {
font-family: 'Essays1743';
font-style: italic;
font-weight: bold;
src: url('fonts/Essays1743-BoldItalic.ttf');
}
</style>
<style type="text/css">
pre { margin-left: 2em; white-space: pre-wrap; }
h2 { margin: 3em 0 1em 0; }
h3 { margin: 2.5em 0 1em 0; }
h4 { margin: 2.5em 0 0.75em 0; }
h5, h6 { margin: 2.5em 0 1em; }
h1 + h2, h1 + h2 + h2, h1 + p, h1 + p + h2 { margin: 0.75em 0 0.75em; }
h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 0.5em; }
p { margin: 1em 0; }
hr:not(.top) { display: block; background: none; border: none; padding: 0; margin: 2em 0; height: auto; }
.element dd, .element dl { margin-top: 0em; margin-bottom: 0.25em;}
dt { margin-top: 0.75em; margin-bottom: 0.5em; clear: left; }
.element dt { margin-top: 0.5em; margin-bottom: 0.5em; }
dt + dt { margin-top: 0; }
dd dt { margin-top: 0.25em; margin-bottom: 0; }
dd p { margin-top: 0; }
dd dl + p { margin-top: 1em; }
dd table + p { margin-top: 1em; }
p + * > li, dd li { margin: 1em 0; }
dt, dfn { font-weight: bold; font-style: normal; }
i, em { font-style: italic; }
dt dfn { font-style: italic; }
pre, code { font-size: inherit; font-family: monospace; font-variant: normal; }
pre strong { color: black; font: inherit; font-weight: bold; background: yellow; }
pre em { font-weight: bolder; font-style: normal; }
@media screen { code { color: #D93B00; } code :link, code :visited { color: inherit; } }
var { background-color: #f9f9f9; border: 1px solid #eee; padding: 0 2px; }
var sub { vertical-align: bottom; font-size: smaller; position: relative; top: 0.1em; }
table { border-collapse: collapse; border-style: hidden hidden none hidden; }
table thead, table tbody { border-bottom: solid; }
table tbody th:first-child { border-left: solid; }
table tbody th { text-align: left; }
table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
blockquote { margin: 0 0 0 2em; border: 0; padding: 0; font-style: italic; }
.bad, .bad *:not(.XXX) { color: #5F6D7A; border-color: gray; background: transparent; }
.matrix, .matrix td { border: none; text-align: right; }
.matrix { margin-left: 2em; }
.dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
.dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
.dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
.toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
img.extra, p.overview { float: right; }
pre.idl { border: solid thin #d3d3d3; background: #FCFCFC; color: black; padding: 0.5em 1em; position: relative; }
pre.idl :link, pre.idl :visited { color: inherit; background: transparent; }
pre.idl::before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
pre.css { border: solid thin; background: #FFFFEE; color: black; padding: 0.5em 1em; }
pre.css:first-line { color: #AAAA50; }
dl.domintro {padding: 0.5em 1em; border: none; background:#E9FBE9; border: 1px solid lightgray; }
hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
dl.domintro dd p { margin: 0.5em 0; }
dl.domintro:before { display: table; margin: -1em -0.5em -0.5em auto; width: auto; content: 'This definition is non-normative. Implementation requirements are given below this definition.'; color: #606060; border:1px solid lightgray; background: white; padding: 0 0.25em;font-size:.9em;}
dl.switch { padding-left: 2em; }
dl.switch > dt { text-indent: -1.5em; }
dl.switch > dt:before { content: '\21AA'; padding: 0 0.5em 0 0; display: inline-block; width: 1em; text-align: right; line-height: 0.5em; }
dl.triple { padding: 0 0 0 1em; }
dl.triple dt, dl.triple dd { margin: 0; display: inline }
dl.triple dt:after { content: ':'; }
dl.triple dd:after { content: '\A'; white-space: pre; }
.diff-old { text-decoration: line-through; color: silver; background: transparent; }
.diff-chg, .diff-new { text-decoration: underline; color: green; background: transparent; }
a .diff-new { border-bottom: 1px blue solid; }
figure.diagrams { border: double black; background: white; padding: 1em; }
figure.diagrams img { display: block; margin: 1em auto; }
h2 { page-break-before: always; }
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
h1 + h2, hr + h2.no-toc { page-break-before: auto; }
p > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]):not([class="t2"]):not([id]):not([lang]),
li > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]):not([class="t2"]):not([id]):not([lang])
{ border-bottom: solid #9999CC; }
div.head { margin: 0 0 1em; padding: 1em 0 0 0; }
div.head p { margin: 0; }
div.head h1 { margin: 0; }
div.head .logo { float: right; margin: 0 1em; }
div.head .logo img { border: none } /* remove border from top image */
div.head dl { margin: 1em 0; }
div.head p.copyright, div.head p.alt { font-size: x-small; font-style: oblique; margin: 0; }
body > .toc > li { margin-top: 1em; margin-bottom: 1em; }
body > .toc.brief > li { margin-top: 0.35em; margin-bottom: 0.35em; }
body > .toc > li > * { margin-bottom: 0.5em; }
body > .toc > li > * > li > * { margin-bottom: 0.25em; }
.toc, .toc li { list-style: none; }
.brief { margin-top: 1em; margin-bottom: 1em; line-height: 1.1; }
.brief li { margin: 0; padding: 0; }
.brief li p { margin: 0; padding: 0; }
.category-list { margin-top: -0.75em; margin-bottom: 1em; line-height: 1.5; }
.category-list::before { content: '\21D2\A0'; font-size: 1.2em; font-weight: 900; }
.category-list li { display: inline; }
.category-list li:not(:last-child)::after { content: ', '; }
.category-list li > span, .category-list li > a { text-transform: lowercase; }
.category-list li * { text-transform: none; } /* don't affect <code> nested in <a> */
.XXX { color: #E50000; background: white; border: solid red; padding: 0.5em; margin: 1em 0; }
.XXX > :first-child { margin-top: 0; }
p .XXX { line-height: 3em; }
.annotation { border: solid thin black; background: #0C479D; color: white; position: relative; margin: 8px 0 20px 0; }
.annotation:before { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 6px -6px -6px 6px; background: #333333; z-index: -1; content: ''; }
.annotation :link, .annotation :visited { color: inherit; }
.annotation :link:hover, .annotation :visited:hover { background: transparent; }
.annotation span { border: none ! important; }
.note { border-left-style: solid; border-left-width: 0.25em; background: none repeat scroll 0 0 #E9FBE9; border-color: #52E052; }
.warning { background-color: #F9F0D4; border: medium double #FF0000; margin: 1em; padding: 1em; }
.note em, .warning em, .note i, .warning i { font-style: normal; }
p.note, div.note { padding: 0.5em 2em; }
span.note { padding: 0 2em; }
.note p:first-child, .warning p:first-child { margin-top: 0; }
.note p:last-child, .warning p:last-child { margin-bottom: 0; }
.warning:before { font-style: normal; }
p.note:before { content: 'Note: '; font-weight: bolder;}
p.warning:before { content: '\26A0 Warning! '; font-weight:bolder;}
.critical {margin:1em; border:double red; padding:1em; background-color:#F9F0D4;}
.bookkeeping:before { display: block; content: 'Bookkeeping details'; font-weight: bolder; font-style: italic; }
.bookkeeping { font-size: 0.8em; margin: 2em 0; }
.bookkeeping p { margin: 0.5em 2em; display: list-item; list-style: square; }
.bookkeeping dt { margin: 0.5em 2em 0; }
.bookkeeping dd { margin: 0 3em 0.5em; }
h4 { position: relative; z-index: 3; }
h4 + .element, h4 + div + .element { margin-top: -2.5em; padding-top: 2em; }
.element {
background: #F4F4FA;
color: black;
margin: 0 0 1em 0.15em;
padding: 0 1em 0.25em 0.75em;
border-left: solid #9999FF 0.25em;
position: relative;
z-index: 1;
}
.element:before {
position: absolute;
z-index: 2;
top: 0;
left: -1.15em;
height: 2em;
width: 0.9em;
background: #F4F4FA;
content: ' ';
border-style: none none solid solid;
border-color: #9999FF;
border-width: 0.25em;
}
.example { display: block; color: #222222; background: #FCFCFC; border-left-style: solid;border-color:#c0c0c0; border-left-width: 0.25em; margin-left: 1em; padding-left: 1em;padding-bottom: 0.5em;}
div.example:before { content: 'Code Example: '; font-weight: bolder;}
td > .example:only-child { margin: 0 0 0 0.1em; }
ul.domTree, ul.domTree ul { padding: 0 0 0 1em; margin: 0; }
ul.domTree li { padding: 0; margin: 0; list-style: none; position: relative; }
ul.domTree li li { list-style: none; }
ul.domTree li:first-child::before { position: absolute; top: 0; height: 0.6em; left: -0.75em; width: 0.5em; border-style: none none solid solid; content: ''; border-width: 0.1em; }
ul.domTree li:not(:last-child)::after { position: absolute; top: 0; bottom: -0.6em; left: -0.75em; width: 0.5em; border-style: none none solid solid; content: ''; border-width: 0.1em; }
ul.domTree span { font-style: italic; font-family: serif; }
ul.domTree .t1 code { color: purple; font-weight: bold; }
ul.domTree .t2 { font-style: normal; font-family: monospace; }
ul.domTree .t2 .name { color: black; font-weight: bold; }
ul.domTree .t2 .value { color: blue; font-weight: normal; }
ul.domTree .t3 code, .domTree .t4 code, .domTree .t5 code { color: gray; }
ul.domTree .t7 code, .domTree .t8 code { color: green; }
ul.domTree .t10 code { color: teal; }
body.dfnEnabled dfn { cursor: pointer; }
.dfnPanel {
display: inline;
position: absolute;
z-index: 10;
height: auto;
width: auto;
padding: 0.5em 0.75em;
font: small sans-serif, Droid Sans Fallback;
background: #DDDDDD;
color: black;
border: outset 0.2em;
}
.dfnPanel * { margin: 0; padding: 0; font: inherit; text-indent: 0; }
.dfnPanel :link, .dfnPanel :visited { color: black; }
.dfnPanel p { font-weight: bolder; }
.dfnPanel * + p { margin-top: 0.25em; }
.dfnPanel li { list-style-position: inside; }
#configUI { position: absolute; z-index: 20; top: 10em; right: 1em; width: 11em; font-size: small; }
#configUI p { margin: 0.5em 0; padding: 0.3em; background: #EEEEEE; color: black; border: inset thin; }
#configUI p label { display: block; }
#configUI #updateUI, #configUI .loginUI { text-align: center; }
#configUI input[type=button] { display: block; margin: auto; }
fieldset { margin: 1em; padding: 0.5em 1em; }
fieldset > legend + * { margin-top: 0; }
fieldset > :last-child { margin-bottom: 0; }
fieldset p { margin: 0.5em 0; }
header p.subline {color:#005A9C; font: 140% sans-serif;margin: 0.75em 0;}
#authorButton {overflow: visible; padding: 0.1em 0.3em; position: fixed; right: 2em; top: 6em; width: auto;}
@media print {#authorButton { display:none;}}
.stability {
position: fixed;
bottom: 0;
left: 0; right: 0;
margin: 0 auto 0 auto;
width: 50%;
background: maroon; color: yellow;
-webkit-border-radius: 1em 1em 0 0;
-moz-border-radius: 1em 1em 0 0;
border-radius: 1em 1em 0 0;
-moz-box-shadow: 0 0 1em #500;
-webkit-box-shadow: 0 0 1em #500;
box-shadow: 0 0 1em red;
padding: 0.5em 1em;
text-align: center;
}
.stability strong {
display: block;
}
.stability input {
-moz-appearance: none; -webkit-appearance: none; margin: 0;
border: 0; padding: 0.25em 0.5em; background: transparent; color: black;
position: absolute; top: -0.5em; right: 0; font: 1.25em sans-serif; text-align: center;
}
.stability input:hover {
color: white;
text-shadow: 0 0 2px black;
}
.stability input:active {
padding: 0.3em 0.45em 0.2em 0.55em;
}
.stability :link, .stability :visited,
.stability :link:hover, .stability :visited:hover {
background: transparent;
color: white;
}
</style><!-- style switcher script by Stommepoes --><link href="http://www.w3.org/StyleSheets/TR/W3C-REC" rel="stylesheet" type="text/css"><link href="switcher/author-view.css" id="author-view" rel="alternate stylesheet" title="Author documentation only"><script src="switcher/authorstylesheet.js"></script><link href="links.html" rel="prev" title="4.8 Links">
<link href="Overview.html#contents" rel="contents" title="目次">
<link href="forms.html" rel="next" title="4.10 Forms">
<body class="split chapter" onload="fixBrokenLink();"><div class="head" id="head">
<header><span id="styleSwitch"></span>
<p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
<h1 id="big-title">HTML5日本語訳</h1>
<p class="no-num no-toc subline">HTMLとXHTMLのための語彙と関連API</p>
<h2 class="no-num no-toc" id="w3c-recommendation-28-october-2014">W3C Recommendation 28 October 2014</h2>
</header></div>
<nav class="prev_next">
<a href="links.html">← 4.8 リンク</a> – <a href="Overview.html#contents">目次</a> – <a href="forms.html">4.10 フォーム →</a>
<ol class="toc"><li><ol><li><a href="tabular-data.html#tabular-data"><span class="secno">4.9</span> テーブルデータ</a>
<ol><li><a href="tabular-data.html#the-table-element"><span class="secno">4.9.1</span> <code>table</code>要素</a>
<ol><li><a href="tabular-data.html#table-descriptions-techniques"><span class="secno">4.9.1.1</span> 表を記述するためのテクニック</a></li><li><a href="tabular-data.html#table-layout-techniques"><span class="secno">4.9.1.2</span> テーブルデザインのためのテクニック</a></li></ol></li><li><a href="tabular-data.html#the-caption-element"><span class="secno">4.9.2</span> <code>caption</code>要素</a></li><li><a href="tabular-data.html#the-colgroup-element"><span class="secno">4.9.3</span> <code>colgroup</code>要素</a></li><li><a href="tabular-data.html#the-col-element"><span class="secno">4.9.4</span> <code>col</code>要素</a></li><li><a href="tabular-data.html#the-tbody-element"><span class="secno">4.9.5</span> <code>tbody</code>要素</a></li><li><a href="tabular-data.html#the-thead-element"><span class="secno">4.9.6</span> <code>thead</code>要素</a></li><li><a href="tabular-data.html#the-tfoot-element"><span class="secno">4.9.7</span> <code>tfoot</code>要素</a></li><li><a href="tabular-data.html#the-tr-element"><span class="secno">4.9.8</span> <code>tr</code>要素</a></li><li><a href="tabular-data.html#the-td-element"><span class="secno">4.9.9</span> <code>td</code>要素</a></li><li><a href="tabular-data.html#the-th-element"><span class="secno">4.9.10</span> <code>th</code>要素</a></li><li><a href="tabular-data.html#attributes-common-to-td-and-th-elements"><span class="secno">4.9.11</span> <code>td</code>と<code>th</code>要素の共通属性</a></li><li><a href="tabular-data.html#processing-model-1"><span class="secno">4.9.12 </span>Processing model</a>
<ol><li><a href="tabular-data.html#forming-a-table"><span class="secno">4.9.12.1 </span>Forming a table</a></li><li><a href="tabular-data.html#header-and-data-cell-semantics"><span class="secno">4.9.12.2 </span>Forming relationships between data cells and header cells</a></li></ol></li></ol></li></ol></li></ol></nav>
<h3 id="tabular-data"><span class="secno">4.9</span> テーブルデータ</h3>
<h4 id="the-table-element"><span class="secno">4.9.1</span> <dfn><code>table</code></dfn>要素</h4>
<dl class="element"><dt><a data-anolis-xref="element-dfn-categories" href="dom.html#element-dfn-categories">カテゴリ</a>:</dt>
<dd><a href="dom.html#flow-content-1">フローコンテンツ</a>。</dd>
<dd><a href="dom.html#palpable-content-0">パルパブルコンテンツ</a>。</dd>
<dt><a data-anolis-xref="element-dfn-contexts" href="dom.html#element-dfn-contexts">この要素を使用できるコンテキスト</a>:</dt>
<dd><a href="dom.html#flow-content-1">フローコンテンツ</a>が期待される場所。</dd>
<dt><a data-anolis-xref="element-dfn-content-model" href="dom.html#element-dfn-content-model">コンテンツモデル</a>:</dt>
<dd>この順序で:任意で<code><a href="#the-caption-element">caption</a></code>要素、0個以上の<code><a href="#the-colgroup-element">colgroup</a></code>要素、任意で<code><a href="#the-thead-element">thead</a></code>要素、任意で<code><a href="#the-tfoot-element">tfoot</a></code>要素、0個以上の<code><a href="#the-tbody-element">tbody</a></code>要素または1個以上の<code><a href="#the-tr-element">tr</a></code>要素のいずれか、任意で<code><a href="#the-tfoot-element">tfoot</a></code>要素(ただし全部で1個の<code><a href="#the-tfoot-element">tfoot</a></code>要素の子のみになる場合もある)、任意で1つ以上の<a href="dom.html#script-supporting-elements-0">スクリプトサポート要素</a>と混合される。</dd>
<dt><a data-anolis-xref="element-dfn-attributes" href="dom.html#element-dfn-attributes">コンテンツ属性</a>:</dt>
<dd><a href="dom.html#global-attributes">グローバル属性</a></dd>
<dd><code data-anolis-xref="attr-table-border"><a href="#attr-table-border">border</a></code></dd>
<dd><code data-anolis-xref="attr-table-sortable">sortable</code> - テーブルに対してソートインターフェースを有効にする</dd>
<dt><span data-anolis-xref="concept-element-tag-omission">text/htmlにおけるタグ省略</span>:</dt>
<dd>どちらのタグも省略不可</dd>
<dt>許可される<a href="dom.html#aria-role-attribute">ARIAロール属性</a>値:</dt>
<dd><a href="dom.html#allowed-aria-roles,-states-and-properties">任意のrole値</a>。</dd>
<dt>許可される<a href="dom.html#state-and-property-attributes">ARIAステートおよびプロパティー</a>:</dt>
<dd><a href="dom.html#index-aria-global">グローバルaria-* 属性</a></dd>
<dd><a href="dom.html#allowed-aria-roles,-states-and-properties">許可されるロールで受け入れ可能な</a>任意の<code title="">aria-*</code>属性。</dd>
<dt><a data-anolis-xref="element-dfn-dom" href="dom.html#element-dfn-dom">DOMインターフェース</a>:</dt><!--TOPIC:DOM APIs-->
<dd>
<pre class="idl">interface <dfn id="htmltableelement">HTMLTableElement</dfn> : <a href="dom.html#htmlelement">HTMLElement</a> {
attribute <a href="#htmltablecaptionelement">HTMLTableCaptionElement</a>? <a data-anolis-xref="dom-table-caption" href="#dom-table-caption">caption</a>;
<a href="dom.html#htmlelement">HTMLElement</a> <a data-anolis-xref="dom-table-createCaption" href="#dom-table-createcaption">createCaption</a>();
void <a data-anolis-xref="dom-table-deleteCaption" href="#dom-table-deletecaption">deleteCaption</a>();
attribute <a href="#htmltablesectionelement">HTMLTableSectionElement</a>? <a data-anolis-xref="dom-table-tHead" href="#dom-table-thead">tHead</a>;
<a href="dom.html#htmlelement">HTMLElement</a> <a data-anolis-xref="dom-table-createTHead" href="#dom-table-createthead">createTHead</a>();
void <a data-anolis-xref="dom-table-deleteTHead" href="#dom-table-deletethead">deleteTHead</a>();
attribute <a href="#htmltablesectionelement">HTMLTableSectionElement</a>? <a data-anolis-xref="dom-table-tFoot" href="#dom-table-tfoot">tFoot</a>;
<a href="dom.html#htmlelement">HTMLElement</a> <a data-anolis-xref="dom-table-createTFoot" href="#dom-table-createtfoot">createTFoot</a>();
void <a data-anolis-xref="dom-table-deleteTFoot" href="#dom-table-deletetfoot">deleteTFoot</a>();
readonly attribute <a href="infrastructure.html#htmlcollection">HTMLCollection</a> <a data-anolis-xref="dom-table-tBodies" href="#dom-table-tbodies">tBodies</a>;
<a href="dom.html#htmlelement">HTMLElement</a> <a data-anolis-xref="dom-table-createTBody" href="#dom-table-createtbody">createTBody</a>();
readonly attribute <a href="infrastructure.html#htmlcollection">HTMLCollection</a> <a data-anolis-xref="dom-table-rows" href="#dom-table-rows">rows</a>;
<a href="dom.html#htmlelement">HTMLElement</a> <a data-anolis-xref="dom-table-insertRow" href="#dom-table-insertrow">insertRow</a>(optional long index = -1);
void <a data-anolis-xref="dom-table-deleteRow" href="#dom-table-deleterow">deleteRow</a>(long index);
attribute DOMString <a data-anolis-xref="dom-table-border" href="obsolete.html#dom-table-border-0">border</a>;
};</pre>
</dd>
</dl><!--TOPIC:HTML--><p><code><a href="#the-table-element">table</a></code>要素は<a data-anolis-xref="concept-table" href="#concept-table">テーブル</a>形式で、複数の寸法を持つデータを<a href="dom.html#represents">表す</a>。</p>
<p><span class="impl">The <code><a href="#the-table-element">table</a></code> element takes part in the <a href="#table-model">table
model</a>.</span> テーブルは、行、列、およびその子孫によって与えられるセルを持つ。行と列はグリッドを形成する。テーブルのセルは完全に重複することなく、グリッドをカバーしなければならない。</p>
<div class="impl">
<p class="note">Precise rules for determining whether this conformance requirement is met are
described in the description of the <a href="#table-model">table model</a>.</p>
</div>
<p>著者は、複雑なテーブルをどのように解釈するかを記述する情報を提供するよう推奨される。<a href="#table-descriptions-techniques">そのような情報を提供する</a>方法についての手引きは後述のとおりである。</p>
<p>テーブルは、レイアウトの補助として使用されるべきでない。歴史的に、多くのウェブ著者は、文書からテーブルデータを抽出することが難しい、ページのレイアウトを制御する方法としてのHTMLにおけるテーブルを持つ。特にスクリーンリーダーのような、アクセシビリティツールのユーザーは、レイアウトのために使用されたテーブルをもつページをナビゲートするためにテーブルデータを見つけることが非常に難しい可能性がある。テーブルをレイアウトに使用する場合、ユーザーエージェントに対して支援技術へテーブルを適切に表現するために、および文書からのテーブルデータの抽出を望むツールへ著者の意図を適切に伝えるために、属性role="presentation"でマークしなければならない。</p>
<p class="note">主にCSS位置決めとCSSテーブルモデルを用いて、レイアウトに対してHTMLのテーブルの代わりに使用できる、さまざまな代替手段がある。<a href="references.html#refsCSS">[CSS]</a></p>
<p><dfn data-anolis-xref="attr-table-border" id="attr-table-border"><code>border</code></dfn>属性は、<code><a href="#the-table-element">table</a></code>が要素レイアウト目的で使用されていないことを明示的に示すために<code><a href="#the-table-element">table</a></code>要素で指定されてもよい。指定された場合、属性の値は空文字列または値を"<code data-anolis-xref="">1</code>"のいずれかにしなければならない。属性は、ボーダーがテーブルのセルの周囲に描画されるべきであることを示すものとして、特定のユーザーエージェントによって使用される。</p><!--!--><!-- http://lists.w3.org/Archives/Public/public-html/2011Apr/0419.html -->
<div class="impl">
<hr><p>Tables can be complicated to understand and navigate. To help
users with this, user agents should clearly delineate cells in a
table from each other, unless the user agent has classified the
table as a
layout table.</p>
</div>
<p class="note"> <span class="impl">and implementors</span>
著者は、ユーザーに対してテーブルをより簡単に移動するために、下記の<a href="#table-layout-techniques">テーブルデザインテクニック</a>の使用を検討することを推奨する。</p>
<div class="impl">
<p>User agents, especially those that do table analysis on arbitrary
content, are encouraged to find heuristics to determine which tables
actually contain data and which are merely being used for layout.
This specification does not define a precise heuristic, but the
following are suggested as possible indicators:</p>
<table><thead><tr><th>Feature
</th><th>Indication
<tbody></th></tr><tr><td>The use of the <code data-anolis-xref="attr-aria-role"><a href="infrastructure.html#attr-aria-role">role</a></code> attribute with the value <code title="">presentation</code>
</td><td>Probably a layout table
</td></tr><tr><td>The use of the <code data-anolis-xref="attr-table-border"><a href="#attr-table-border">border</a></code> attribute with the non-conforming value 0
</td><td>Probably a layout table
</td></tr><tr><td>The use of the non-conforming <code data-anolis-xref="attr-table-cellspacing"><a href="obsolete.html#attr-table-cellspacing">cellspacing</a></code> and <code data-anolis-xref="attr-table-cellpadding"><a href="obsolete.html#attr-table-cellpadding">cellpadding</a></code> attributes with the value 0
</td><td>Probably a layout table
<tbody></td></tr><tr><td>The use of <code><a href="#the-caption-element">caption</a></code>, <code><a href="#the-thead-element">thead</a></code>, or <code><a href="#the-th-element">th</a></code> elements
</td><td>Probably a non-layout table
</td></tr><tr><td>The use of the <code data-anolis-xref="attr-tdth-headers"><a href="#attr-tdth-headers">headers</a></code> and <code data-anolis-xref="attr-th-scope"><a href="#attr-th-scope">scope</a></code> attributes
</td><td>Probably a non-layout table
</td></tr><tr><td>The use of the <code data-anolis-xref="attr-table-border"><a href="#attr-table-border">border</a></code> attribute with a value other than 0
</td><td>Probably a non-layout table
</td></tr><tr><td>Explicit visible borders set using CSS
</td><td>Probably a non-layout table
<tbody></td></tr><tr><td>The use of the <code data-anolis-xref="attr-table-summary"><a href="obsolete.html#attr-table-summary">summary</a></code> attribute
</td><td>Not a good indicator (both layout and non-layout tables have historically been given this attribute)
</td></tr></table><p class="note">It is quite possible that the above suggestions are
wrong. Implementors are urged to provide feedback elaborating on
their experiences with trying to create a layout table detection
heuristic.</p>
</div>
<hr><!--TOPIC:DOM APIs--><dl class="domintro"><dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-caption"><a href="#dom-table-caption">caption</a></code> [ = <var data-anolis-xref="">value</var> ]</dt>
<dd>
<p>テーブルの<code><a href="#the-caption-element">caption</a></code>要素を返す。</p>
<p><code><a href="#the-caption-element">caption</a></code>要素を置き換えるために、設定が可能である。新しい値が<code><a href="#the-caption-element">caption</a></code>要素でない場合、<code><a href="infrastructure.html#hierarchyrequesterror">HierarchyRequestError</a></code>例外を投げる。</p>
</dd>
<dt><var data-anolis-xref="">caption</var> = <var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-createCaption"><a href="#dom-table-createcaption">createCaption</a></code>()</dt>
<dd>
<p>表が<code><a href="#the-caption-element">caption</a></code>要素を持つことを保証し、それを返す。</p>
</dd>
<dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-deleteCaption"><a href="#dom-table-deletecaption">deleteCaption</a></code>()</dt>
<dd>
<p>表が<code><a href="#the-caption-element">caption</a></code>要素を持たないことを保証する。</p>
</dd>
<dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-tHead"><a href="#dom-table-thead">tHead</a></code> [ = <var data-anolis-xref="">value</var> ]</dt>
<dd>
<p>テーブルの<code><a href="#the-thead-element">thead</a></code>要素を返す。</p>
<p><code><a href="#the-thead-element">thead</a></code>要素を置き換えるために、設定が可能である。新しい値が<code><a href="#the-thead-element">thead</a></code>要素でない場合、<code><a href="infrastructure.html#hierarchyrequesterror">HierarchyRequestError</a></code>例外を投げる。</p>
</dd>
<dt><var data-anolis-xref="">thead</var> = <var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-createTHead"><a href="#dom-table-createthead">createTHead</a></code>()</dt>
<dd>
<p>表が<code><a href="#the-thead-element">thead</a></code>要素を持つことを保証し、それを返す。</p>
</dd>
<dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-deleteTHead"><a href="#dom-table-deletethead">deleteTHead</a></code>()</dt>
<dd>
<p>表が<code><a href="#the-thead-element">thead</a></code>要素を持たないことを保証する。</p>
</dd>
<dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-tFoot"><a href="#dom-table-tfoot">tFoot</a></code> [ = <var data-anolis-xref="">value</var> ]</dt>
<dd>
<p>テーブルの<code><a href="#the-tfoot-element">tfoot</a></code>要素を返す。</p>
<p><code><a href="#the-tfoot-element">tfoot</a></code>要素を置き換えるために、設定が可能である。新しい値が<code><a href="#the-tfoot-element">tfoot</a></code>要素でない場合、<code><a href="infrastructure.html#hierarchyrequesterror">HierarchyRequestError</a></code>例外を投げる。</p>
</dd>
<dt><var data-anolis-xref="">tfoot</var> = <var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-createTFoot"><a href="#dom-table-createtfoot">createTFoot</a></code>()</dt>
<dd>
<p>表が<code><a href="#the-tfoot-element">tfoot</a></code>要素を持つことを保証し、それを返す。</p>
</dd>
<dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-deleteTFoot"><a href="#dom-table-deletetfoot">deleteTFoot</a></code>()</dt>
<dd>
<p>表が<code><a href="#the-tfoot-element">tfoot</a></code>要素を持たないことを保証する。</p>
</dd>
<dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-tBodies"><a href="#dom-table-tbodies">tBodies</a></code></dt>
<dd>
<p>テーブルの<code><a href="#the-tbody-element">tbody</a></code>要素の<code><a href="infrastructure.html#htmlcollection">HTMLCollection</a></code>を返す。</p>
</dd>
<dt><var data-anolis-xref="">tbody</var> = <var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-createTBody"><a href="#dom-table-createtbody">createTBody</a></code>()</dt>
<dd>
<p><code><a href="#the-tbody-element">tbody</a></code>要素を作成してテーブルに挿入し、それを返す。</p>
</dd>
<dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code></dt>
<dd>
<p>テーブルの<code><a href="#the-tr-element">tr</a></code>要素の<code><a href="infrastructure.html#htmlcollection">HTMLCollection</a></code>を返す。</p>
</dd>
<dt><var data-anolis-xref="">tr</var> = <var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-insertRow"><a href="#dom-table-insertrow">insertRow</a></code>( [ <var data-anolis-xref="">index</var> ] )</dt>
<dd>
<p>必要であれば、<code><a href="#the-tbody-element">tbody</a></code>要素とともに、<code><a href="#the-tr-element">tr</a></code>要素を作成し、引数で指定された位置にあるテーブルへそれらを挿入して、<code><a href="#the-tr-element">tr</a></code>を返す。</p>
<p>位置は、テーブルの行を基準にする。引数が省略されている場合、デフォルトでインデックス-1は、テーブルの末尾に挿入することと同じである。</p>
<p>指定された位置が-1未満または行数より大きい場合、<code><a href="infrastructure.html#indexsizeerror">IndexSizeError</a></code>例外を投げる。</p>
</dd>
<dt><var data-anolis-xref="">table</var> . <code data-anolis-xref="dom-table-deleteRow"><a href="#dom-table-deleterow">deleteRow</a></code>(<var data-anolis-xref="">index</var>)</dt>
<dd>
<p>テーブルで指定された位置とともに<code><a href="#the-tr-element">tr</a></code>要素を削除する。</p>
<p>位置は、テーブルの行を基準にする。インデックス-1は、テーブルの最後の行を削除するのと同じである。</p>
<p>指定された位置が-1未満または最終行のインデックスよりも大きい、または行が存在しない場合、<code><a href="infrastructure.html#indexsizeerror">IndexSizeError</a></code>例外を投げる。</p>
</dd>
</dl><div class="impl">
<p>The <dfn data-anolis-xref="dom-table-caption" id="dom-table-caption"><code>caption</code></dfn> IDL attribute must return, on
getting, the first <code><a href="#the-caption-element">caption</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any,
or null otherwise. On setting, if the new value is a <code><a href="#the-caption-element">caption</a></code> element, the first
<code><a href="#the-caption-element">caption</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any, must be removed, and
the new value must be inserted as the first node of the <code><a href="#the-table-element">table</a></code> element. If the new
value is not a <code><a href="#the-caption-element">caption</a></code> element, then a <code><a href="infrastructure.html#hierarchyrequesterror">HierarchyRequestError</a></code> DOM
exception must be thrown instead.</p>
<p>The <dfn data-anolis-xref="dom-table-createCaption" id="dom-table-createcaption"><code>createCaption()</code></dfn> method must return
the first <code><a href="#the-caption-element">caption</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any; otherwise
a new <code><a href="#the-caption-element">caption</a></code> element must be created, inserted as the first node of the
<code><a href="#the-table-element">table</a></code> element, and then returned.</p>
<p>The <dfn data-anolis-xref="dom-table-deleteCaption" id="dom-table-deletecaption"><code>deleteCaption()</code></dfn> method must remove
the first <code><a href="#the-caption-element">caption</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any.</p>
<p>The <dfn data-anolis-xref="dom-table-tHead" id="dom-table-thead"><code>tHead</code></dfn> IDL attribute must return, on
getting, the first <code><a href="#the-thead-element">thead</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any, or
null otherwise. On setting, if the new value is a <code><a href="#the-thead-element">thead</a></code> element, the first
<code><a href="#the-thead-element">thead</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any, must be removed, and
the new value must be inserted immediately before the first element in the <code><a href="#the-table-element">table</a></code>
element that is neither a <code><a href="#the-caption-element">caption</a></code> element nor a <code><a href="#the-colgroup-element">colgroup</a></code> element, if
any, or at the end of the table if there are no such elements. If the new value is not a
<code><a href="#the-thead-element">thead</a></code> element, then a <code><a href="infrastructure.html#hierarchyrequesterror">HierarchyRequestError</a></code> DOM exception must be thrown
instead.</p>
<p>The <dfn data-anolis-xref="dom-table-createTHead" id="dom-table-createthead"><code>createTHead()</code></dfn> method must return the
first <code><a href="#the-thead-element">thead</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any; otherwise a new
<code><a href="#the-thead-element">thead</a></code> element must be created and inserted immediately before the first element in
the <code><a href="#the-table-element">table</a></code> element that is neither a <code><a href="#the-caption-element">caption</a></code> element nor a
<code><a href="#the-colgroup-element">colgroup</a></code> element, if any, or at the end of the table if there are no such elements,
and then that new element must be returned.</p>
<p>The <dfn data-anolis-xref="dom-table-deleteTHead" id="dom-table-deletethead"><code>deleteTHead()</code></dfn> method must remove the
first <code><a href="#the-thead-element">thead</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any.</p>
<p>The <dfn data-anolis-xref="dom-table-tFoot" id="dom-table-tfoot"><code>tFoot</code></dfn> IDL attribute must return, on
getting, the first <code><a href="#the-tfoot-element">tfoot</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any, or
null otherwise. On setting, if the new value is a <code><a href="#the-tfoot-element">tfoot</a></code> element, the first
<code><a href="#the-tfoot-element">tfoot</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any, must be removed, and
the new value must be inserted immediately before the first element in the <code><a href="#the-table-element">table</a></code>
element that is neither a <code><a href="#the-caption-element">caption</a></code> element, a <code><a href="#the-colgroup-element">colgroup</a></code> element, nor a
<code><a href="#the-thead-element">thead</a></code> element, if any, or at the end of the table if there are no such elements. If
the new value is not a <code><a href="#the-tfoot-element">tfoot</a></code> element, then a <code><a href="infrastructure.html#hierarchyrequesterror">HierarchyRequestError</a></code> DOM
exception must be thrown instead.</p>
<p>The <dfn data-anolis-xref="dom-table-createTFoot" id="dom-table-createtfoot"><code>createTFoot()</code></dfn> method must return the
first <code><a href="#the-tfoot-element">tfoot</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any; otherwise a new
<code><a href="#the-tfoot-element">tfoot</a></code> element must be created and inserted immediately before the first element in
the <code><a href="#the-table-element">table</a></code> element that is neither a <code><a href="#the-caption-element">caption</a></code> element, a
<code><a href="#the-colgroup-element">colgroup</a></code> element, nor a <code><a href="#the-thead-element">thead</a></code> element, if any, or at the end of the
table if there are no such elements, and then that new element must be returned.</p>
<p>The <dfn data-anolis-xref="dom-table-deleteTFoot" id="dom-table-deletetfoot"><code>deleteTFoot()</code></dfn> method must remove the
first <code><a href="#the-tfoot-element">tfoot</a></code> element child of the <code><a href="#the-table-element">table</a></code> element, if any.</p>
<p>The <dfn data-anolis-xref="dom-table-tBodies" id="dom-table-tbodies"><code>tBodies</code></dfn> attribute must return an
<code><a href="infrastructure.html#htmlcollection">HTMLCollection</a></code> rooted at the <code><a href="#the-table-element">table</a></code> node, whose filter matches only
<code><a href="#the-tbody-element">tbody</a></code> elements that are children of the <code><a href="#the-table-element">table</a></code> element.</p>
<p>The <dfn data-anolis-xref="dom-table-createTBody" id="dom-table-createtbody"><code>createTBody()</code></dfn> method must create a
new <code><a href="#the-tbody-element">tbody</a></code> element, insert it immediately after the last <code><a href="#the-tbody-element">tbody</a></code> element
child in the <code><a href="#the-table-element">table</a></code> element, if any, or at the end of the <code><a href="#the-table-element">table</a></code> element
if the <code><a href="#the-table-element">table</a></code> element has no <code><a href="#the-tbody-element">tbody</a></code> element children, and then must return
the new <code><a href="#the-tbody-element">tbody</a></code> element.</p>
<p>The <dfn data-anolis-xref="dom-table-rows" id="dom-table-rows"><code>rows</code></dfn> attribute must return an
<code><a href="infrastructure.html#htmlcollection">HTMLCollection</a></code> rooted at the <code><a href="#the-table-element">table</a></code> node, whose filter matches only
<code><a href="#the-tr-element">tr</a></code> elements that are either children of the <code><a href="#the-table-element">table</a></code> element, or children
of <code><a href="#the-thead-element">thead</a></code>, <code><a href="#the-tbody-element">tbody</a></code>, or <code><a href="#the-tfoot-element">tfoot</a></code> elements that are themselves
children of the <code><a href="#the-table-element">table</a></code> element. The elements in the collection must be ordered such
that those elements whose parent is a <code><a href="#the-thead-element">thead</a></code> are included first, in tree order,
followed by those elements whose parent is either a <code><a href="#the-table-element">table</a></code> or <code><a href="#the-tbody-element">tbody</a></code>
element, again in tree order, followed finally by those elements whose parent is a
<code><a href="#the-tfoot-element">tfoot</a></code> element, still in tree order.</p>
<p>The behavior of the <dfn data-anolis-xref="dom-table-insertRow" id="dom-table-insertrow"><code>insertRow(<var data-anolis-xref="">index</var>)</code></dfn> method depends on the state of the table. When it is called,
the method must act as required by the first item in the following list of conditions that
describes the state of the table and the <var data-anolis-xref="">index</var> argument:</p>
<dl class="switch"><dt>If <var data-anolis-xref="">index</var> is less than −1 or greater than the number of elements in
<code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code> collection:</dt>
<dd>The method must throw an <code><a href="infrastructure.html#indexsizeerror">IndexSizeError</a></code> exception.</dd>
<dt>If the <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code> collection has zero elements in it, and the
<code><a href="#the-table-element">table</a></code> has no <code><a href="#the-tbody-element">tbody</a></code> elements in it:</dt>
<dd>The method must create a <code><a href="#the-tbody-element">tbody</a></code> element, then create a <code><a href="#the-tr-element">tr</a></code> element,
then append the <code><a href="#the-tr-element">tr</a></code> element to the <code><a href="#the-tbody-element">tbody</a></code> element, then append the
<code><a href="#the-tbody-element">tbody</a></code> element to the <code><a href="#the-table-element">table</a></code> element, and finally return the
<code><a href="#the-tr-element">tr</a></code> element.</dd>
<dt>If the <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code> collection has zero elements in it:</dt>
<dd>The method must create a <code><a href="#the-tr-element">tr</a></code> element, append it to the last <code><a href="#the-tbody-element">tbody</a></code>
element in the table, and return the <code><a href="#the-tr-element">tr</a></code> element.</dd>
<dt>If <var data-anolis-xref="">index</var> is −1 or equal to the number of items in <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code> collection:</dt>
<dd>The method must create a <code><a href="#the-tr-element">tr</a></code> element, and append it to the parent of the last
<code><a href="#the-tr-element">tr</a></code> element in the <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code> collection. Then, the
newly created <code><a href="#the-tr-element">tr</a></code> element must be returned.</dd>
<dt>Otherwise:</dt>
<dd>The method must create a <code><a href="#the-tr-element">tr</a></code> element, insert it immediately before the <var data-anolis-xref="">index</var>th <code><a href="#the-tr-element">tr</a></code> element in the <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code>
collection, in the same parent, and finally must return the newly created <code><a href="#the-tr-element">tr</a></code>
element.</dd>
</dl><p>When the <dfn data-anolis-xref="dom-table-deleteRow" id="dom-table-deleterow"><code>deleteRow(<var data-anolis-xref="">index</var>)</code></dfn> method is called, the user agent must run the following
steps:</p>
<ol><li><p>If <var data-anolis-xref="">index</var> is equal to −1, then <var data-anolis-xref="">index</var> must be
set to the number of items in the <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code> collection, minus
one.</li>
<li><p>Now, if <var data-anolis-xref="">index</var> is less than zero, or greater than or equal to the
number of elements in the <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code> collection, the method must
instead throw an <code><a href="infrastructure.html#indexsizeerror">IndexSizeError</a></code> exception, and these steps must be aborted.</li>
<li><p>Otherwise, the method must remove the <var data-anolis-xref="">index</var>th element in the <code data-anolis-xref="dom-table-rows"><a href="#dom-table-rows">rows</a></code> collection from its parent.</p>
</li></ol><p>The <dfn data-anolis-xref="dom-table-border" id="dom-table-border"><code>border</code></dfn> IDL
attribute must <a href="infrastructure.html#reflect">reflect</a> the content attribute of the
same name.</p>
</div><!--TOPIC:HTML-->
<div class="example">
<p>これは、数独パズルをマークアップするために使用されているテーブルの例である。そのようなテーブルで必要のない、ヘッダーの欠如を観察する。</p>
<pre><section>
<style>
table { border-collapse: collapse; border: solid thick; }
colgroup, tbody { border: solid medium; }
td { border: solid thin; height: 1.4em; width: 1.4em; text-align: center; padding: 0; }
</style>
<h1>Today's Sudoku</h1>
<table>
<colgroup><col><col><col>
<colgroup><col><col><col>
<colgroup><col><col><col>
<tbody>
<tr> <td> 1 <td> <td> 3 <td> 6 <td> <td> 4 <td> 7 <td> <td> 9
<tr> <td> <td> 2 <td> <td> <td> 9 <td> <td> <td> 1 <td>
<tr> <td> 7 <td> <td> <td> <td> <td> <td> <td> <td> 6
<tbody>
<tr> <td> 2 <td> <td> 4 <td> <td> 3 <td> <td> 9 <td> <td> 8
<tr> <td> <td> <td> <td> <td> <td> <td> <td> <td>
<tr> <td> 5 <td> <td> <td> 9 <td> <td> 7 <td> <td> <td> 1
<tbody>
<tr> <td> 6 <td> <td> <td> <td> 5 <td> <td> <td> <td> 2
<tr> <td> <td> <td> <td> <td> 7 <td> <td> <td> <td>
<tr> <td> 9 <td> <td> <td> 8 <td> <td> 2 <td> <td> <td> 5
</table>
</section></pre>
</div>
<h5 id="table-descriptions-techniques"><span class="secno">4.9.1.1</span> 表を記述するためのテクニック</h5>
<p class="auth" id="table-descriptions">1行目のヘッダーと1列目のヘッダーをもつセルの1つ以上のグリッドからなるテーブルに対して、および一般に読者がコンテンツを理解する難しさがあるかもしれない場所で任意のテーブルに対して、著者はテーブルを導入する説明情報を含めるべきである。この情報はすべてのユーザーに対して有用であるが、たとえばスクリーンリーダーのユーザーなど、テーブルを見ることができないユーザーに対して特に有用である。</p>
<p>そのような説明情報は、テーブルの目的を紹介し、その基本的なセル構造を要約し、傾向やパターンを強調し、および一般にどのようにテーブルを使用するかをユーザーに教えるべきである。</p><!-- Describing the conclusions of the data in a table is useful to everyone; explaining how to
read the table, if not obvious from the headers alone, is useful to everyone; describing the
structure of the table, if it is easy to grasp visually, might not be useful to everyone, but it
might also not be useful to users who can quickly navigate the table with an accessibility tool.
-->
<p>たとえば、次の表において:</p>
<table><caption>Characteristics with positive and negative sides</caption>
<thead><tr><th id="n"> Negative
</th><th> Characteristic
</th><th> Positive
<tbody></th></tr><tr><td headers="n r1"> Sad
<th id="r1"> Mood
<td> Happy
</td></th></td></tr><tr><td headers="n r2"> Failing
<th id="r2"> Grade
<td> Passing
</td></th></td></tr></table><p>"左側の列の否定的な側面および右側の列に肯定的な側面とともに、特性は2列目に示されている"のような何かを、表がレイアウトする方法を示す説明が恩恵を受けるかもしれない。</p>
<p>この情報を含めるためのさまざまな方法がある:</p>
<dl><dt>文において、テーブルを囲んで</dt>
<dd>
<div class="example"><pre><p id="summary">In the following table, characteristics are
given in the second column, with the negative side in the left column and the positive
side in the right column.</p>
<table aria-describedby="summary">
<caption>Characteristics with positive and negative sides</caption>
<thead>
<tr>
<th id="n"> Negative
<th> Characteristic
<th> Positive
<tbody>
<tr>
<td headers="n r1"> Sad
<th id="r1"> Mood
<td> Happy
<tr>
<td headers="n r2"> Failing
<th id="r2"> Grade
<td> Passing
</table></pre></div>
<p class="note">上記の例における<a href="http://www.w3.org/TR/wai-aria/states_and_properties#aria-describedby"><code data-anolis-xref="attr-aria-*">aria-describedby</code></a>属性は、明示的に支援技術ユーザーに対してテーブルに情報を関連付けるために使用される。</p>
</dd>
<dt>テーブルの<code><a href="#the-caption-element">caption</a></code>で</dt>
<dd>
<div class="example"><pre><table>
<caption>
<strong>Characteristics with positive and negative sides.</strong>
<p>Characteristics are given in the second column, with the
negative side in the left column and the positive side in the right
column.</p>
</caption>
<thead>
<tr>
<th id="n"> Negative
<th> Characteristic
<th> Positive
<tbody>
<tr>
<td headers="n r1"> Sad
<th id="r1"> Mood
<td> Happy
<tr>
<td headers="n r2"> Failing
<th id="r2"> Grade
<td> Passing
</table></pre></div>
</dd>
<dt>テーブルの横に、同じ<code><a href="grouping-content.html#the-figure-element">figure</a></code>で</dt>
<dd>
<div class="example"><pre><figure>
<figcaption>Characteristics with positive and negative sides</figcaption>
<p>Characteristics are given in the second column, with the
negative side in the left column and the positive side in the right
column.</p>
<table>
<thead>
<tr>
<th id="n"> Negative
<th> Characteristic
<th> Positive
<tbody>
<tr>
<td headers="n r1"> Sad
<th id="r1"> Mood
<td> Happy
<tr>
<td headers="n r2"> Failing
<th id="r2"> Grade
<td> Passing
</table>
</figure></pre></div>
</dd>
<dt>テーブルの横に、<code><a href="grouping-content.html#the-figure-element">figure</a></code>の<code><a href="grouping-content.html#the-figcaption-element">figcaption</a></code>で</dt>
<dd>
<div class="example"><pre><figure>
<figcaption>
<strong>Characteristics with positive and negative sides</strong>
<p>Characteristics are given in the second column, with the
negative side in the left column and the positive side in the right
column.</p>
</figcaption>
<table>
<thead>
<tr>
<th id="n"> Negative
<th> Characteristic
<th> Positive
<tbody>
<tr>
<td headers="n r1"> Sad
<th id="r1"> Mood
<td> Happy
<tr>
<td headers="n r2"> Failing
<th id="r2"> Grade
<td> Passing
</table>
</figure></pre></div>
</dd>
</dl><p class="auth">必要に応じて著者はまた、他の技術または上記の技術の組み合わせを使用してもよい。</p>
<p>もちろん、最良の選択肢は、テーブルがレイアウトされる理由を説明する記述を書くことよりもむしろ、一切の説明を必要としないようにテーブルを調整することである。</p>
<div class="example">
<p>上記の例で使用されるテーブルの場合、ヘッダーが上と左側に来るように、テーブルの単純な再配置は、<code data-anolis-xref="attr-tdth-headers"><a href="#attr-tdth-headers">headers</a></code>属性の使用の要求を削除するだけでなく、説明の要求を削除する。</p>
<pre><table>
<caption>Characteristics with positive and negative sides</caption>
<thead>
<tr>
<th> Characteristic
<th> Negative
<th> Positive
<tbody>
<tr>
<th> Mood
<td> Sad
<td> Happy
<tr>
<th> Grade
<td> Failing
<td> Passing
</table></pre>
</div>
<h5 id="table-layout-techniques"><span class="secno">4.9.1.2</span> テーブルデザインのためのテクニック</h5>
<p>良いテーブルデザインは、テーブルがより読みやすく、使いやすくするための鍵となる。</p>
<p>視覚メディアにおいて、列と行の境界を提供して行の背景を交互にすることは、複雑なテーブルをより読みやすくするために非常に効果的である。</p>
<p>大量のコンテンツを持つテーブルに対して、特に、ユーザーエージェントがボーダーをレンダリングしない状況において等幅フォントを使用することは、ユーザーにパターンに気づくのを助けることができる。(残念ながら、歴史的な理由により、テーブルのボーダーをレンダリングしないことは、共通のデフォルトである。)</p>
<p>音声メディアにおいて、テーブルのセルは、セルの内容を読む前に対応するヘッダーを報告することによって、およびソースの順序でテーブルの内容全体をシリアライズするのではなく、むしろグリッド方式でテーブルをナビゲートできるようにすることで区別できる。</p>
<p>著者は、これらの効果を達成するためにCSSを使用するよう推奨される。</p>
<div class="impl">
<p>User agents are encouraged to render tables using these techniques whenever the page does not
use CSS and the table is not classified as a layout table.</p>
</div>
<h4 id="the-caption-element"><span class="secno">4.9.2</span> <dfn><code>caption</code></dfn>要素</h4>
<dl class="element"><dt><a data-anolis-xref="element-dfn-categories" href="dom.html#element-dfn-categories">カテゴリ</a>:</dt>
<dd>なし。</dd>
<dt><a data-anolis-xref="element-dfn-contexts" href="dom.html#element-dfn-contexts">この要素を使用できるコンテキスト</a>:</dt>
<dd><code><a href="#the-table-element">table</a></code>要素の最初の子として。</dd>
<dt><a data-anolis-xref="element-dfn-content-model" href="dom.html#element-dfn-content-model">コンテンツモデル</a>:</dt>
<dd><a href="dom.html#flow-content-1">フローコンテンツ</a>、ただし<code><a href="#the-table-element">table</a></code>要素の子孫を除く。</dd>
<dt><a data-anolis-xref="element-dfn-attributes" href="dom.html#element-dfn-attributes">コンテンツ属性</a>:</dt>
<dd><a href="dom.html#global-attributes">グローバル属性</a></dd>
<dt><span data-anolis-xref="concept-element-tag-omission">text/htmlにおけるタグ省略</span>:</dt>
<dd>どちらのタグも省略不可</dd>
<dt>許可される<a href="dom.html#aria-role-attribute">ARIAロール属性</a>値:</dt>
<dd><a href="dom.html#allowed-aria-roles,-states-and-properties">任意のrole値</a>。</dd>
<dt>許可される<a href="dom.html#state-and-property-attributes">ARIAステートおよびプロパティー</a>:</dt>
<dd><a href="dom.html#index-aria-global">グローバルaria-* 属性</a></dd>
<dd><a href="dom.html#allowed-aria-roles,-states-and-properties">許可されるロールで受け入れ可能な</a>任意の<code title="">aria-*</code>属性。</dd>
<dt><a data-anolis-xref="element-dfn-dom" href="dom.html#element-dfn-dom">DOMインターフェース</a>:</dt><!--TOPIC:DOM APIs-->
<dd>
<pre class="idl">interface <dfn id="htmltablecaptionelement">HTMLTableCaptionElement</dfn> : <a href="dom.html#htmlelement">HTMLElement</a> {};</pre>
</dd>
</dl><!--TOPIC:HTML--><p>要素が親を持ち、それが<code><a href="#the-table-element">table</a></code>要素である場合は<code><a href="#the-caption-element">caption</a></code>要素は、その親である<code><a href="#the-table-element">table</a></code>のタイトルを<a href="dom.html#represents">表す</a>。</p>
<div class="impl">
<p>The <code><a href="#the-caption-element">caption</a></code> element takes part in the <a href="#table-model">table model</a>.</p>
</div>
<p><code><a href="#the-table-element">table</a></code>要素が<code><a href="grouping-content.html#the-figcaption-element">figcaption</a></code>以外の<code><a href="grouping-content.html#the-figure-element">figure</a></code>要素でコンテンツのみである場合、<code><a href="#the-caption-element">caption</a></code>要素は<code><a href="grouping-content.html#the-figcaption-element">figcaption</a></code>を選んで省略されるべきである。</p>
<p>理解するのがより容易になるような、キャプションはテーブルに対するコンテキストを導入できる。</p>
<div class="example">
<p>たとえば、次のテーブルを考えてみる:</p>
<table class="dice-example"><tr><th> </th><th> 1 </th><th> 2 </th><th> 3 </th><th> 4 </th><th> 5 </th><th> 6
</th></tr><tr><th> 1 <td> 2 </td><td> 3 </td><td> 4 </td><td> 5 </td><td> 6 </td><td> 7
</td></th></tr><tr><th> 2 <td> 3 </td><td> 4 </td><td> 5 </td><td> 6 </td><td> 7 </td><td> 8
</td></th></tr><tr><th> 3 <td> 4 </td><td> 5 </td><td> 6 </td><td> 7 </td><td> 8 </td><td> 9
</td></th></tr><tr><th> 4 <td> 5 </td><td> 6 </td><td> 7 </td><td> 8 </td><td> 9 </td><td> 10
</td></th></tr><tr><th> 5 <td> 6 </td><td> 7 </td><td> 8 </td><td> 9 </td><td> 10 </td><td> 11