De Viquipèdia
|
Consultar |
|
Editar |
|
Manteniment i organització |
|
Establir contacte |
|
Edita |
Aquesta pàgina és la traducció corresponent de m:Help:Table (en anglès). Visiteu l'enllaç si voleu informació més completa o per a actualitzar aquesta pàgina.
MediaWiki suporta tres formes d'escriure taules:
- XHTML
- HTML simplificat
- Sintaxi Wiki
Comparació de sintaxis
|
XHTML |
HTML simplificat |
Wiki |
Taula |
<table></table> |
<table></table> |
{| paràmetres |} |
Subtítol |
<caption></caption> |
<caption></caption> |
|+ subtítol |
Fila |
<tr></tr> |
<tr> |
|- paràmetres |
Cel·la |
<td>c1</td>
<td>c2</td>
|
<td>c1
<td>c2
|
| c1 | c2 |
Cel·la |
<td>c1</td><td>c2</td> <td>c3</td> |
<td>c1 <td>c2 <td>c3 |
|c1||c2||c3 |
Capçalera |
<th></th> |
<th> |
! capçalera |
Exemple 1 |
|
<table>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>6</td>
</tr>
</table>
|
<table>
<tr>
<td> 1 <td> 2
<tr>
<td> 3 <td> 4
<tr>
<td> 5 <td> 6
</table>
|
{|
| 1 || 2
|-
| 3 || 4
|-
| 5 || 6
|}
|
Exemple 2 |
Blanc i negre
Nom del color |
Codi |
Negre |
#000000 |
Blanc |
#ffffff |
|
<table class="wikitable">
<caption>Blanc i negre</caption>
<tr>
<th>Nom del color</th>
<th>Codi</th>
</tr>
<tr>
<td>Negre</td>
<td style="background: #000000; color:#FFFFFF" >#000000</td>
</tr>
<tr>
<td>Blanc</td>
<td>#ffffff</td>
</tr>
</table>
|
<table class="wikitable">
<caption>Blanc i negre</caption>
<tr>
<th>Nom del color
<th>Codi
<tr>
<td>Negre
<td style="background: #000000; color:#FFFFFF" >#000000
<tr>
<td>Blanc
<td>#ffffff
</table>
|
{| class="wikitable"
|+ '''Blanc i negre'''
! Nom del color !! Codi
|-
| Negre
| style="background: #000000; color:#FFFFFF" | #000000
|-
| Blanc
| #ffffff
|}
|
Pros |
- Es pot crear amb qualsevol editor XHTML
- Es pot formatar per a fer-lo més llegible
- Fàcil lectura
- Sintaxi coneguda
|
- Es pot crear amb qualsevol editor HTML
- Es pot formatar per a fer-lo més llegible
- Sintaxi coneguda
- Ocupa menys que l'XHTML
|
- Fàcil escriptura
- Fàcil lectura
- Ocupa el menor espai
|
Contres |
- Tediós
- Ocupa molt espai
- Difícil lectura
|
- Confús, especialment per a gent amb experiència amb l'HTML
- Mal delimitat
- Difícil lectura
|
- Sintaxi poc coneguda
- Estructura rígida, no es pot sagnar
|
|
XHTML |
HTML simplificat |
Wiki |