tab-size
The tab-size
property sets the width of the tab character (Unicode U+0009) in a block-level element. The initial value of tab-size
is 8, and this property is inherited by child elements. Normally, tab characters are converted to spaces. However, when using the tab-size
property for HTML tags other than pre
tag, the white-space
property must also be used and set to the pre-wrap
value.
Syntax:
tab-size: length | integer | inherit
integer – the number of spaces. The value must be positive.
length – the number with length unit (px, em, %)
See the Pen tab-size by majadc (@majadc) on CodePen.