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.

Resources:

MDN tab-size

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.