Tab Gaya Ukuran Properti
Contoh
Setel tabSize elemen <pre>:
document.getElementById("myPRE").style.tabSize = "16";
Definisi dan Penggunaan
Properti tabSize menentukan panjang ruang yang digunakan untuk karakter tab.
Dalam HTML, karakter tab biasanya ditampilkan sebagai karakter spasi tunggal, kecuali untuk beberapa elemen, seperti <textarea> dan <pre>, dan hasil dari properti tabSize hanya akan terlihat untuk elemen ini.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
tabSize | Yes | 79.0 | Not supported Use MozTabSize |
6.1 | 15.0 |
Sintaksis
Kembalikan properti tabSize:
object.style.tabSize
Setel properti tabSize:
object.style.tabSize = "number|length|initial|inherit"
Nilai properti
Value | Description |
---|---|
number | Default value 8. Specifies the number of space-characters that should be displayed for each tab-character |
length | Specifies the length of a tab-character. This property value is not supported in any of the major browsers |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Detail Teknis
Nilai Bawaan: | 8 |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti ukuran tab dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti ukuran tab
Objek Gaya