Yes you can use them, for example I use them to more easily style groups of data, like this:
thead th { width: 100px; border-bottom: solid 1px #ddd; font-weight: bold; } tbody:nth-child(odd) { background: #f5f5f5; border: solid 1px #ddd; } tbody:nth-child(even) { background: #e5e5e5; border: solid 1px #ddd; }
Customer Order Month Customer 1 #1 January Customer 1 #2 April Customer 1 #3 March Customer 2 #1 January Customer 2 #2 April Customer 2 #3 March Customer 3 #1 January Customer 3 #2 April Customer 3 #3 March
You can view an example here. It'll only work in newer browsers, but that's what I'm supporting in my current application, you can use the grouping for JavaScript etc. The main thing is it's a convenient way to visually group the rows to make the data much more readable. There are other uses of course, but as far as applicable examples, this one is the most common one for me.
Согласно этому примеру это можно сделать: w3-struct-tables .
Да. Из DTD
<!ELEMENT table
(caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
Поэтому он ожидает один или несколько. Далее говорится
Используйте несколько разделов tbody, когда правила необходимы между группами таблиц строк.