CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES

CSS3 tab-size Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The tab-size CSS property is used to customize the width of the tab (U+0009) character.

The following table summarizes the usages context and the version history of this property.

Default value: 8
Applies to: Block containers
Inherited: Yes
Animatable: No. See animatable properties.
Version: New in CSS3

Syntax

The syntax of the property is given with:

tab-size integer | length | initial | inherit

The example below shows the tab-size property in action.

pre {
    -moz-tab-size: 4; /* Firefox */
      -o-tab-size: 4; /* Opera */
         tab-size: 4; /* Standard syntax */
}

Property Values

The following table describes the values of this property.

Value Description
integer Specifies the number of spaces in a tab. It must be positive integer.
length Specifies the width of a tab as a length value in px, pt, cm, em, etc. Negative length values are not allowed.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element tab-size property.

Browser Compatibility

The tab-size property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 4+ -moz-
  • Google Chrome 21+
  • Internet Explorer ×
  • Apple Safari 6.1+
  • Opera 10.6+ -o-, 15+

Warning: The length value for the tab-size property is currently not supported by the most of the browsers. You should better avoid using the length value.


Further Reading

See tutorial on: CSS Text.

Related properties: white-space, word-spacing.

Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties