Easy Tutorial
❮ Pr Outline Css3 Pr Animation Name ❯

CSS tab-size Property

CSS Reference Manual

Example

Set the tab-size for a <pre> element:


Browser Support

Currently, only Chrome supports the tab-size property.

Firefox supports an alternative property, -moz-tab-size.

Opera supports an alternative property, -o-tab-size.

No browsers currently support the value as a length unit.


Definition and Usage

The tab-size property specifies the length of the tab character (tab).

In HTML, the tab character is typically displayed as a single space character, except for some elements like <textarea> and <pre>, where the result of the tab-size property is effective only for these elements.

Default value: 8
Inherited: Yes
--- ---
Animatable: No. See Animatable
--- ---
Version: CSS3
--- ---
JavaScript syntax: object.style.tabSize="16" Try it
--- ---

CSS Syntax

Property Values

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

CSS Reference Manual

❮ Pr Outline Css3 Pr Animation Name ❯