2015-08-28 31 views
1

如果我限定<thead>這樣的:HTML表語義:<thead>與多個<tr>

<thead> 
    <tr> 
    <th colspan=3>Category 1</th> 
    <th colspan=2>Category 2</th> 
    </tr> 
    <tr> 
    <th>Sub-cat 1</th> 
    <th>Sub-cat 2</th> 
    <th>Sub-cat 3</th> 
    <th>Sub-cat 4</th> 
    <th>Sub-cat 5</th> 
    </tr> 
</thead> 

這是否結構語義正確分隔的類別/子類別?

我知道它在外觀上看起來不錯,但我不確定這將如何看待屏幕閱讀器或一般W3C規範。

回答

-3

瀏覽器可以使用thead,tbody,tfooter來啓用獨立於頁眉和頁腳的滾動表體。另外,當打印跨越多個頁面的大型表格時,thead,tbody,tfooter元素可以使表格頁眉和頁腳打印在每頁的頂部和底部。有關詳細信息,請參閱此處:http://www.w3schools.com/tags/tag_thead.asp

+0

是否意味着沒有區分類別的列和子列?它純粹是一個結構性的東西? ..我也不依賴於w3schools的信息。 – Grapho

+0

是的。這與列沒有關係。 – Imran

+0

非常感謝 – Grapho