Pomoc:Tables
Przejdź do nawigacji
Przejdź do wyszukiwania
📊 **Creating & Formatting Tables**
Learn how to build and style data tables in wikitext.
📌 Basic Table Syntax
Tables in MediaWiki are created using curly braces and pipes ({| ... |}).
Simple Table Example
{| class="wikitable"
! Header 1 !! Header 2 !! Header 3
|-
| Row 1, Cell 1 || Row 1, Cell 2 || Row 1, Cell 3
|-
| Row 2, Cell 1 || Row 2, Cell 2 || Row 2, Cell 3
|}
💡 Table Elements Breakdown
- **{|** – Starts the table.
- **class="wikitable"** – Adds standard borders and gray header backgrounds.
- **!** – Header cell (bold text). Use !! to add another header in the same line.
- **|-** – Starts a new row.
- **|** – Standard data cell. Use || to add another cell in the same line.
- **|}** – Closes the table.
⚡ Advanced Options
Sortable Tables
Allow users to sort table columns by clicking the headers:
- {| class="wikitable sortable"
Merging Cells
- **Merge columns**: | colspan="2" | Merged text
- **Merge rows**: | rowspan="2" | Merged text