Anonymous user
Help:Editing: Difference between revisions
From The Blockheads Wiki
m
→Tables
>Abcboy mNo edit summary |
>Abcboy m (→Tables) |
||
Line 331: | Line 331: | ||
===Tables=== | ===Tables=== | ||
Table styling is done using CSS and a few HTML attributes. | |||
{| class="wikitable" style="margin:auto; width:90%;" | {| class="wikitable" style="margin:auto; width:90%;" | ||
! colspan=" | ! colspan="2" | Tables | ||
|- | |- | ||
| | | Starting a table | ||
| <code><nowiki> | | <code><nowiki>{|</nowiki></code> | ||
| | |- | ||
| Creating a header | |||
| <code><nowiki>! Header content</nowiki></code> | |||
|- | |||
| Creating a row | |||
| <code><nowiki>|-</nowiki></code> | |||
|- | |||
| Creating a cell | |||
| <code><nowiki>| Cell content</nowiki></code> | |||
|- | |||
| Ending a table | |||
| <code><nowiki>|}</nowiki></code> | |||
|- | |||
| <pre>{| | |||
! Header 1 | |||
! Header 2 | |||
|- | |||
| Cell 1 | |||
| Cell 2 | |||
|}</pre> | |||
| style="background:#fff;" | | |||
{| | |||
! Header 1 | |||
! Header 2 | |||
|- | |||
| Cell 1 | |||
| Cell 2 | |||
|} | |||
|}<br clear="all"> | |||
{| class="wikitable" style="margin:auto; width:90%;" | |||
! colspan="2" | Attributes | |||
|- | |||
| Assigning attributes to a table | |||
| <code><nowiki>{| class="wikitable" style="margin:auto;"</nowiki></code> | |||
|- | |||
| Assigning attributes to a cell | |||
| <code><nowiki>| style="text-align:right;" | Cell content</nowiki></code> | |||
|- | |||
| Vertically merged cells | |||
| <code><nowiki>| rowspan="2" | Cell content</nowiki></code> | |||
|- | |||
| Horizontally merged cells | |||
| <code><nowiki>| colspan="2" | Cell content</nowiki></code> | |||
|- | |||
| <pre>{| class="wikitable" style="margin:auto;" | |||
! Fruit | |||
! Price | |||
! Location | |||
|- | |||
| colspan="2" | No apples | |||
| rowspan="3" | Shop A | |||
|- | |||
| Oranges | |||
| style="text-align:right;" | 12 | |||
|- | |||
| Mangoes | |||
| style="text-align:right;" | 15 | |||
|}</pre> | |||
| style="background:#fff;" | | |||
{| class="wikitable" style="margin:auto;" | |||
! Fruit | |||
! Price | |||
! Location | |||
|- | |||
| colspan="2" | No apples | |||
| rowspan="3" | Shop A | |||
|- | |||
| Oranges | |||
| style="text-align:right;" | 12 | |||
|- | |||
| Mangoes | |||
| style="text-align:right;" | 15 | |||
|} | |} | ||
|}<br clear="all"> | |||
==See also== | ==See also== |