CSS3 Tutorial: tab-size

Tab size /><noscript><img class=

tab-size

With the CSS3 tab-size property you can set the width of a tab character (U+0009). The value can be an integer or length

Syntax: <integer>

Browser support

Example1

<style>
pre.tabSize2{
tab-size: 2;
}
</style>
<pre class="tabSize2">	Lorem ipsum dolor sit amet.</pre>

Example2

<style>
pre.tabSize0{
tab-size: 0;
}
</style>
<pre class="tabSize0">	Lorem ipsum dolor sit amet.</pre>

Example3

<style>
pre .tabSize10{
tab-size: 10;
}
</style>
<pre class="tabSize10">	Lorem ipsum dolor sit amet.</pre>

Example4

<style>
pre.tabSize10px{
tab-size: 10px;
}
</style>
<pre class="tabSize10px">	Lorem ipsum dolor sit amet.</pre>

Tab size
Image 1. different tab sizes

Check this example in your browser

Leave a comment