tab-size
Determines the width of tab characters ( ) in your text. This is extremely useful for styling code blocks or pre-formatted text where you want consistent indentation.
It is documented as part of the CSS Text specification.
Syntax
/* Usage Example */
pre {
/* Sets the width of a tab character to be equal to 2 spaces */
tab-size: 2;
}
/* Global values */
tab-size: inherit;
tab-size: initial;
tab-size: revert;
tab-size: revert-layer;
tab-size: unset;
tab-size Browser support
Widely available
Since
2021 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.
21+
91+
7+
79+