The tab-size property sets the length of the space used for the tab character (unicode U+0009). Default tab size value is 8;


tab-size: length | integer | inherit

integer – the number of spaces. The value must be positive.

length – the number with length unit (px, em, %)

.selector {
    tab-size: 4;
    tab-size: inherit;

Tab character normally is converted to spaces. When using tab-size property for other html tags than <pre> use white-space property and set to pre-wrap.



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.