Difference between revisions of "Tables - Mediawiki"

From Help Wiki
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TwoColumn|lead=
+
 
Creating tables in a wiki can be surprisingly simple once you get the hang of it. You can of course use html to generate tables as well but once you get familiar with wiki tables you may want to switch over as they are easier to maintain and less intimidating to the non-html initiated.
+
Learn the wiki syntax for creating tables. Remember, you can also use the [[Visual Editor - Mediawiki|Visual Editor]] for a quick and easy way to create tables.
|content=
+
 
===Creating tables using wiki syntax===
 
===Creating tables using wiki syntax===
 
The following table was made with:
 
The following table was made with:
Line 39: Line 38:
  
 
The pretty styling happens by calling class="wikitable". This css must added to your Mediawiki:Common.css page. See this wiki's [[Mediawiki:Common.css|Common.css]] for an example.
 
The pretty styling happens by calling class="wikitable". This css must added to your Mediawiki:Common.css page. See this wiki's [[Mediawiki:Common.css|Common.css]] for an example.
 +
 +
 +
 +
====Making Tables Accessible====
 +
Please see [https://www.mediawiki.org/wiki/Help:Tables#Accessibility_of_table_header_cells Accessibility of table header cells] for instructions on making tables more accessible when rendered on non-visual media.
  
 
; See also
 
; See also
 
*http://meta.wikimedia.org/wiki/Help:Table
 
*http://meta.wikimedia.org/wiki/Help:Table
|sidebar=
 
{{Mediawiki Help}}
 
{{GetHelp}}
 
}}
 
 
  [[category:Mediawiki]]
 
  [[category:Mediawiki]]

Latest revision as of 16:54, 21 October 2017

Learn the wiki syntax for creating tables. Remember, you can also use the Visual Editor for a quick and easy way to create tables.

Creating tables using wiki syntax

The following table was made with:

{| class="wikitable"
|+ Table Caption
!width="10%"|Header 1
!width="10%"|Header 2
!width="10%"|Header 3
!width="70%"|Header 4
|- 
| Cell 1 || Cell 2 || Cell 3 || Cell 4
|- 
| Cell 5 || Cell 6 || Cell 7 || Cell 8
|-
| Cell 9 || Cell 10 || Cell 11 || Cell 12 
|-
| Cell 13 || Cell 14 || Cell 15 || Cell 16
|}
Table Caption
Header 1 Header 2 Header 3 Header 4
Cell 1 Cell 2 Cell 3 Cell 4
Cell 5 Cell 6 Cell 7 Cell 8
Cell 9 Cell 10 Cell 11 Cell 12
Cell 13 Cell 14 Cell 15 Cell 16

The pretty styling happens by calling class="wikitable". This css must added to your Mediawiki:Common.css page. See this wiki's Common.css for an example.


Making Tables Accessible

Please see Accessibility of table header cells for instructions on making tables more accessible when rendered on non-visual media.

See also