Help:Tables

Geopoeia
Jump to navigation Jump to search
Referencearrow.png Main Article: Help:Contents

preferred formating for tables

{|class="wikitable"
|+'''title'''
!
!column 1
!column 2
|-
|row 1
|a
|b 
|-
|row 2
|c
|d
|}

results in:

title
column 1 column 2
row 1 a b
row 2 c d

useful codes for tables

  • class="wikitable sortable" (makes a table sortable; to make a table sortable, the row header lines should start with "!" rather than "|")
  • style="text-align:center;" (horizontal alignment; standard is left; use right for columns with numbers)
  • valign="top" (vertical alignment: top of the cell; standard is centered)
  • style="float: right;" (creates a table at the right of the page, with text continuing at the left)
  • colspan="2" (combines two horizontally adjacent cells into one)
  • rowspan="2" (combines two vertically adjacent cells into one)