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.
Quick example
pre {
/* Sets the width of a tab character to be equal to 2 spaces */
tab-size: 2;
} Quick facts
Initial value
8Inherited
Yes
Applies to
block containers
Animation type
length
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.
Safe to use without fallbacks.
21+
91+
7+
79+