Help:Tables

From HEWIKI
Jump to: navigation, search

Wiki Help On: Editing | Style | Headers | Linking | Processing Instructions | Tables | Administration | Uploading | Templates | Preferences | Searching | Contents



Tables in MediaWiki can be accomplished either with standard html syntax, or with special wiki markup. Both of the examples on this page end up with the same output, just with different syntax.

Contents


HTML syntax

<table border="1" width="100%" cellpadding="5" cellspacing="2">
  <tr align="center" bgcolor="pink">
    <td>'''ID'''</td>
    <td>'''Name'''</td>
    <td>'''Description'''</td>
  </tr>
  <tr>
    <td>123</td>
    <td>John Foo</td>
    <td>Some foo user</td>
  </tr>
    <td>456</td>
    <td>Mary Richardson</td>
    <td>Contact person from Foo Corp.</td>
  </tr>
</table>
 </tr>
ID Name Description
123 John Foo Some foo user
456 Mary Richardson Contact person from Food Corp.

Wiki markup

{| border="1" width="100%" cellpadding="5" cellspacing="2"
!ID!!Name!!Description
|- 
|  123 || John Foo || Some foo user 
|- 
|  456 || Mary Richardson || Contact person from Foo Corp. 
|}


ID Name Description
123 John Foo Some foo user
456 Mary Richardson Contact person from Foo Corp.



Or if it's desired to add color:

{| border="1" width="100%" cellpadding="5" cellspacing="2"
|- bgcolor = "pink"
!ID!!Name!!Description
|- 
|  123 || John Foo || Some foo user 
|- 
|  456 || Mary Richardson || Contact person from Foo Corp. 
|}


ID Name Description
123 John Foo Some foo user
456 Mary Richardson Contact person from Foo Corp.

For more complex examples, please see the help guide on tables, at Wikimedia.org.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox