Wikipedia:Manual of Style/Accessibility/Data tables tutorial: Difference between revisions

Content deleted Content added
Overview of basics: Remove "..." from markup so not confused with code.
Tags: Mobile edit Mobile web edit Advanced mobile edit
Layout of table headers: Fix typo. Simplify table.
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 50:
 
=== Layout of table headers ===
As can be seen in the example above, row headers are formatted by default as bold, centredcentered and with a darker background. This is the common behavior across the Internet, and the default rendering in most browsers. In some circumstances it might be desirable to apply a style customized for a specific case. The class <code>plainrowheaders</code> will apply left-aligned and normal-weight formatting so that editors do not feel the need to override the header formatting with inline CSS declarations for each cell.<ref group="note">See the discussions at MediaWiki talk:Common.css [//en.wikipedia.org/w/index.php?title=MediaWiki_talk:Common.css&diff=prev&oldid=395578619#some_wikitable_ideas some wikitable ideas] and [//en.wikipedia.org/w/index.php?title=MediaWiki_talk:Common.css&diff=prev&oldid=395578619#Bold_row_headers bold row headers].</ref> Used by itself, <code>plainrowheaders</code> will make headers appear similar to unmodified data cells, except for the darker background.
 
To use <code>plainrowheaders</code>, place it (like <code>wikitable</code>) in the <code>class=</code> attribute at the beginning of the table. The example below shows custom row header style using a larger font instead of boldfacing:
<pre>
{| class="wikitable plainrowheaders"
! scope="row" style="font-size: larger;" | [row header 1]
</pre>