Search results
Results From The WOW.Com Content Network
Specifies whether a header cell is a header for a column (scope="col"), row (scope="row"), group of columns (colspan="2" scope="colgroup"), or group of rows (rowspan="2" scope="rowgroup"). It has no visual effect, but is used by screen readers and is recommended according to accessibility guidelines .
wikitable – provides column headers with bold font on shaded background, and other common style. See here for details. This class should be used for almost all tables, unless there is a reason not to. sortable – adds up & down icons to column headers which enable
And it will do it correctly for tables with row headers too (see also Help:Table#Row headers). Tab2wiki will not compress the wikitext at all if this is checked: "First element in a row is a header". Note: The visual editor will copy templates (as in a column of country/state/province names with flag templates), but it will not copy inline ...
The two most commonly used classes are "wikitable" and "wikitable sortable"; the latter allows the reader to sort the table by clicking on the header cell of any column. |+ caption Required for accessibility purposes on data tables, and placed only between the table start and the first table row. ! header cell Optional.
Consecutive rows of column headers are top sticky, so avoid adding a row of headers right under the column headers that don't apply to the entire table such as a section header meant to visually separate the table. A solution might be to move each section to a column or separate tables, which also avoids accessibility issues per MOS:COLHEAD.
Below is an example of a complex table with headers that aren't visually clear, but uses id and headers instead of scope to associate column and row headers to individual cells. Again, it is recommended to simplify the table so headers are visually clear by splitting it into a "d" and "e" table if possible where the text in the "d" and "e ...
Instead of trying to make a super-cell that spans rows/columns, split it into smaller cells while leaving some cells intentionally empty. Use a non-breaking space with or {} in empty cells to maintain the table structure. Custom CSS styling: Override the wikitable class defaults by explicitly specifying: border-collapse: collapse;
mw-collapsible also does not require a header row in the table, as collapsible did. Tables will show the "[hide]" / "[show]" controls in the first row of the table (whether or not it is a header row), unless a table caption is present.(see § Tables with captions) Example with a header row