Easy Tutorial
❮ Jsref Gethours Met Node Isdefaultnamespace ❯

Style tabSize Property

Style Object

Example

Set the tabSize of a <pre> element:


Definition and Usage

The tabSize property specifies the length of the tab character (tab).

In HTML, the tab character is usually displayed as a single space character, except for some elements like <textarea> and <pre>, where the tabSize property only takes effect on these elements.


Browser Support

Currently, only Chrome supports the tabSize property.

Firefox supports an alternative property, the MozTabSize property.

Opera supports an alternative property, the OTabSize property.

No browsers currently support the value as a length unit.


Syntax

Return the tabSize property:

Set the tabSize property:

Property Values

Value Description
number The default value is 8. Specifies the number of space characters to be displayed for each tab character.
length Specifies the length of the tab character. Almost all major browsers do not support this property value.
initial Sets this property to its default value. See initial
inherit Inherits this property from its parent element. See inherit

Technical Details

Default value: 8
Return value: String, representing the tab-size property of the element.
--- ---
CSS version CSS3
--- ---

Related Articles

CSS Reference: tab-size Property


Style Object

❮ Jsref Gethours Met Node Isdefaultnamespace ❯