Bantuan:Tabel: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
HsfBot (bicara | kontrib)
k Bot: Perubahan kosmetika
Tidak ada ringkasan suntingan
Baris 1:
<!--{{dablink|Untuk pengenalan dasar-dasarnya, lihat [[Bantuan:Tabel/Pengenalan tabel|Pengenalan tabel]].}}-->
Perangkat lunak [[MediaWiki]] yang digunakan oleh [[Wikipedia]] menyediakan fasilitas pembuatan '''tabel''' dengan dua cara: sintaks [[HTML]] atau sintaks tabel-wiki. Halaman bantuan ini menjelaskan sintaks wiki untuk pembuatan tabel sebagai metode yang lebih dianjurkan.
 
Sebuah '''[[Tabel (informasi)|tabel]]''' adalah susunan baris dan kolom yang digunakan untuk mengatur dan menempatkan data. Perangkat lunak [[MediaWiki]] yang digunakan oleh [[Wikipedia]] menyediakan fasilitas pembuatan tabel dengan dua cara: sintaks [[HTML]] dan sintaks tabel-wiki (sintaks tabel-wiki lebih dianjurkan). Tabel dapat dikustomisasi dengan berbagai gaya dan reka. Dianjurkan memakai [[Bantuan:Daftar|daftar berkolom]] sebagai pertimbangan.
 
== Menggunakan toolbar ==
 
[[File:Advanced toolbar of vector skin.png|frame|center|Bilah alat vektor – default]]
[[File:Toolbar2.PNG|frame|center|Bilah alat monobook]]
 
Klik [[File:Vector toolbar insert table button.png]] atau [[File:Button insert table.png]] (Tabel) pada [[Bantuan:Bilah alat penyunting|bilah alat penyunting]] untuk menambahkan tabel secara otomatis. Jika tombol "Tabel" belum ada pada bilah alat penyunting, ikuti [[mw:Customizing edit toolbar|panduan ini]] untuk menambahkannya.
 
Setelah diklik, akan muncul jendela "Masukkan tabel". Jika Anda langsung mengeklik tombol "Masukkan" pada jendela itu, akan muncul teks berikut ini:
<pre style="display: inline-block;">
{| class="wikitable"
|-
! Teks judul !! Teks judul !! Teks judul
|-
| Teks sel || Teks sel || Teks sel
|-
| Teks sel || Teks sel || Teks sel
|-
| Teks sel || Teks sel || Teks sel
|}
</pre>
 
Kode tersebut akan menghasilkan tabel berikut:
{| class="wikitable"
|-
! Teks judul !! Teks judul !! Teks judul
|-
| Teks sel || Teks sel || Teks sel
|-
| Teks sel || Teks sel || Teks sel
|-
| Teks sel || Teks sel || Teks sel
|}
 
Teks yang disediakan ("Teks judul" dan "Teks sel") diganti dengan data yang ingin ditaruh pada tabel.
 
== Sintaks tabel-wiki ==
Baris 18 ⟶ 55:
* Parameter untuk baris, diberikan setelah '''<nowiki>|-</nowiki>'''.<br />Contoh: <nowiki>|- valign="top"</nowiki>.
* Parameter untuk judul kolom atau kolom data diberikan setelah '''!''' atau '''|''' dan dibatasi dengan isi kolom dengan '''|'''.<br />Contoh: <nowiki>| align="center" | Isi data</nowiki>.
<!--
== Basic table markup summary ==
{{See also|Help:Basic table markup}}
{| class="wikitable" style="width:100%"
| style="padding: 10px;"| <big><nowiki>{|</nowiki></big>
! style="padding: 5px;"|
Table start
| ''Required''.
|-
| style="padding: 10px;"| <big><nowiki>|+</nowiki></big>
! style="padding: 5px;" |
Table caption
| ''Optional''.
Only between table start and first table row.
|-
| style="padding: 10px;"| <big><nowiki>|-</nowiki></big>
! style="padding: 5px;" |
Table row
| ''Optional''.
Can be omitted before the first row and/or after the last row.
|-
| style="padding: 10px;"| <big><nowiki>!</nowiki></big>
! style="padding: 5px;" |
Table header cell
| ''Optional''.
Consecutive table header cells may be added on same line separated by double marks (<code>!!</code>); or start on new lines, each with its own single mark (<code>!</code>).
|-
| style="padding: 10px;"| <big><nowiki>|</nowiki></big>
! style="padding: 5px;" |
Table data cell
| ''Optional''.
Consecutive table data cells may be added on same line separated by double marks (<code><nowiki>||</nowiki></code>) or start on new lines, each with its own single mark (<code><nowiki>|</nowiki></code>). This mark is also used to separate [[HTML attribute]]s from cell and caption contents.
|-
| style="padding: 10px;"| <big><nowiki>|}</nowiki></big>
! style="padding: 5px;" |
Table end
| ''Required''.
|}
 
*The above marks must ''start on a new line'', except the double marks (<code>||</code> and <code>!!</code>) for optionally adding consecutive cells to a single line.
 
*''Blank spaces'' at the beginning of a line are ignored.
 
*''Content'' may either follow its cell mark on the same line (after any optional HTML attributes); or on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as with lists, headings, or nested tables, must be on its own new line.
 
*To insert a ''pipe character'' (<code>|</code>) into a table caption or cell, use the <code>&lt;nowiki&gt;|&lt;/nowiki&gt;</code> escaping markup.
-->
== Contoh ==