Javascript examples for CSS Style Property:tabSize
The tabSize property gets and sets the size of the tab character.
Value | Description |
---|---|
number | Default value 8. Set the number of space-characters used display tab-character |
length | Sets the length of a tab-character. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Item | Value |
---|---|
Default Value: | 8 |
Return Value: | A String, representing the tab-size property of an element |
CSS Version | CSS3 |
Set the tabSize of a <pre> element:
<!DOCTYPE html> <html> <body> <pre id="t1"> I have tabs inside! </pre>/*from w w w . j a va2 s . c o m*/ <button onclick="myFunction()">Test</button> <script> function myFunction() { document.getElementById("t1").style.MozTabSize = "16"; // Code for Firefox document.getElementById("t1").style.OTabSize = "16"; // Code for Opera 10.6-12.1 document.getElementById("t1").style.tabSize = "16"; } </script> </body> </html>