Style tabSize Property
Set the tabSize of a <pre> element:
Try it yourself »
Definition and Usage
The tabSize property specifies the length of the space used for the tab character.
In HTML, the tab character is usually displayed as a single space-character, except for some elements, like <textarea> and <pre>, and the result of the tabSize property will only be visible for these elements.
The tabSize property is currently only supported in Chrome.
Firefox supports an alternative, the MozTabSize property.
Opera supports an alternative, the OTabSize property.
No browser is currently supporting the value as a length unit.
Return the tabSize property:
Set the tabSize property:
|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|
|Return Value:||A String, representing the tab-size property of an element|
CSS reference: tab-size property
Thank You For Helping Us!
Your message has been sent to W3Schools.