No Login Data Private Local Save

CSS tab‑size Property Demo - Online Control Indentation

5
0
0
0

CSS tab‑size Property Demo

Interactively explore the tab-size CSS property. Enter text with tab characters, adjust the tab size value, and see how it affects indentation.

Editor
Live Preview

        
CSS Output
tab-size: 8;

Frequently Asked Questions

The tab-size CSS property specifies the width of a tab character (U+0009) in spaces or other length units. It applies to elements with white-space set to pre, pre-wrap, or similar, such as <pre> and <textarea>.

Set it to a number (like 4) to represent spaces, or a length value (like 2em). The default is 8. You can also use inherit, initial, or unset.

tab-size is supported in all modern browsers. Older Firefox versions required -moz-tab-size, but the unprefixed property has been supported since Firefox 53.

Tab characters are a single character that can be displayed at varying widths, making indentation flexible. Spaces always occupy exactly one space. Using tabs in source code allows each developer to view indentation at their preferred width.