CSS tab-size property
Set a tab-size for an element:
Pre {-Moz-Tab-Size: 16;} / * For Firefox code * /
Pre {-o-tab-size: 16;} / * For Opera's code * /
Try it out . . .
Browser support
Currently, only Chrome supports tab-size properties.
Firefox supports another property that replaces this property, the -moz-tab-size property.
Opera supports another property that replaces this property, the -o-tab-size property.
Currently, no browser supports this value as a length unit.
Definitions and usages
The tab-size property specifies the length of the space for tab characters.
In HTML, tab characters typically appear as a single space character, except for elements such as the results of the tab-size property, which are valid only for those elements.
Default: | 8 |
---|---|
Inherited: | Is |
Animated: | Whether. See Animation . |
Version: | CSS3 |
JavaScript syntax: | object .style.tabSize="16" Give it a try |
CSS syntax
The property value
value | describe | test |
---|---|---|
number | The default is 8.Specifies the number of space characters to display each tab (Tab) character. | test " |
length | Specify the length of the tab (Tab) character.Almost all mainstream browsers do not support this attribute value. | |
initial | Set this property for its default value.See initial 。 | test " |
inherit | Inheriting this property from the parent element.See inherit 。 |