====== 9.2.4. Use the headers and id attributes to associate cells with table header cells in complex data tables ======
A complex data table is a table in which the header cells do not systematically apply to all the cells of a row or a column.
To associate the headers with data in this type of table, use the ''id'' (identifiers) attribute on the ''
'' cells and headers attribute on the '' | '' cells.
You then need to enter the identifiers of the associated headers in the ''headers'' attribute of data cells. If several headers are associated with one data cell, the identifiers must be separated by a space in the ''headers'' attribute.
Sales revenue comparison of Davis and Davison companies in the UK and in the rest of the world
50,7 |
139,3 |
27,1 |
476,0 |
Sales revenue comparison of Davis and Davison companies in the UK and in the rest of the world
50,7 |
139,3 |
27,1 |
476,0 |
**Warning**
The ''headers'' and ''id'' attributes must not be used in combination with the ''scope'' attribute.
**Note**
It is a good accessibility practice to respect the logical order when including the ''id'' attributes of associated header cells in the ''headers'' attribute of data cells.
A screen reader will read these values in the order they are entered.
===== Related recommendations =====
* Previous recommendation: [[notices:html-css:utiliser-l-attribut-scope-pour-associer-les-cellules-aux-entetes-des-tableaux-de-donnees-simples]]
* Next recommendation: [[notices:html-css:ne-pas-utiliser-les-proprietes-css-display-ou-visibility-pour-masquer-un-contenu-qui-ne-peut-pas-etre-affiche-par-l-utilisateur]]
|