La propiedad tab-size en CSS se utiliza para personalizar el ancho del carácter de tabulación cuyo símbolo está U+0009 en Unicode.

Funciones tab-size css
| Valor inicial | 8 |
|---|---|
| Aplicado a | Bloques de contenedores. |
| Heredable | Sí |
| Móvil | Sí |
| Valor calculado | Como se especificó. |
/*valores numéricos */ tab-size: 4; tab-size: 0; /* */ tab-size: 10px; tab-size: 2em; /* Valores globales */ tab-size: inherit; tab-size: initial; tab-size: unset;
Ejemplos y aplicaciones en código
Un ejemplo del uso de la propiedad tab-size en un elemento (tenga en cuenta que el único caso en que la pestaña se mostrará en documentos HTML es dentro del elemento o si establecemos el valor de la propiedad white-space en pre o pre-wrap):
< pre > ¡ Espacio utilizado! tab-size: initial; pre > < pre class = "tab-2" > tab ¡Espacio utilizado! tab-size: 2; pre > < pre class = "tab-4" > tab ¡Espacio utilizado! tab-size-size: 4; pre > < pre class = "tab-6" > tab ¡Espacio usado! tab-size-size: 6; pre > < pre class = "tab-em" >tab ¡Se ha utilizado el espacio! tab-size-size: 1em; pre >
Código CSS:
.tab-2 { tab-size: 2; }
.tab-4 { tab-size: 4; }
.tab-6 { tab-size: 6; }
.tab-em { tab-size: 1em; }Soporte de navegadores
| Característica | Chrome | Firefox | IE | Opera | Safari |
|---|---|---|---|---|---|
| Soporte básico | 21 | 4.0 | No soportado | 15 | 6.1 |
| 42 | 53.0 | No soportado | 29 | No soportado |
El navegador Edge no es compatible con esta función.
Características generales
La propiedad acepta tab-size uno de los dos valores siguientes.
El número de espacios en un único carácter de tabulación. Este valor no debe ser negativo.
Muestra un único carácter de tabulación. Este valor no debe ser negativo.
Estructura tab-size css
tab-size:| ;
Consulta también
- La página de propiedades
line-heightque ajusta el espaciado utilizado para las líneas. - La página de propiedades
letter-spacingque especifica cuál es el espacio entre caracteres de texto.
- ¿Qué es el código CSS y en que se utiliza?
- Característica background-attachment en CSS
- Característica background-blend-mode en CSS
- Característica background-clip en CSS
- Característica background-color en CSS
- Característica background-image en CSS
- Característica background-origin en CSS
- Característica background-position en CSS
- Característica background-repeat en CSS
- Característica background-size en CSS
- Característica border-bottom en CSS
- Característica border-bottom-color en CSS
- Característica border-bottom-style en CSS
- Característica border-bottom-width en CSS
- Característica border-color en CSS
- Característica border-image en CSS
- Característica border-image-outset en CSS
- Característica border-image-repeat en CSS
- Característica border-image-slice en CSS
- Característica border-image-source en CSS
- Característica border-left-color en CSS
- Característica border-left-style en CSS
- Característica border-left-width en CSS
- Característica border-right en CSS
- Característica Box Sizing en CSS
- Característica box-shadow en CSS
- Característica de Border en CSS
- Característica de Opacity en CSS
- Característica del Background en CSS
- Característica del Color en el CSS
- Característica del CSS Bottom
- Característica del CSS Display
- Característica del Margin en CSS
- Característica del Overflow en CSS
- Característica del Padding en CSS
- Características align-content en CSS
- Características align-items en CSS
- Características align-self en CSS
- Características border-bottom-left-radius en CSS
- Características border-bottom-right-radius en CSS
- Características border-image-width en CSS
- Características border-left en CSS









































