--- title: Text localeTitle: Texto --- ## Texto CSS proporciona varias propiedades para cambiar la apariencia del texto. A continuación se explican varias propiedades del texto. #### Color de texto \`\` \`html Este es un ejemplo de propiedad de texto CSS. ``` ``` css p { color:red; } ``` En el ejemplo anterior, el `color` del texto del elemento `

` se cambia a rojo. También puede especificar el color como valores RGB, valores HLS y códigos hexadecimales (para obtener más información acerca de los colores, haga clic [aquí](https://guide.freecodecamp.org/css/colors) ). #### Alineación del texto `text-align` propiedad `text-align` se usa para establecer la alineación horizontal del texto. Puede tomar valores de `left` , `right` , `center` y `justify` . \`\` \`css pag { text-align: center; } ``` Here the text is aligned to the `center` ([example](https://www.w3schools.com/css/tryit.asp?filename=trycss_text-align)).When `text-align` is set to `justify`,each line is stretched so that every line has equal width, and the left and right margins are straight ([example](https://www.w3schools.com/css/tryit.asp?filename=trycss_text-align_all)). #### Text Decoration ``` css pag { texto-decoración: subrayado; } ``` The `text-decoration` property is used to set or remove decorations from text. The value `text-decoration: none;` is often used to remove underlines from links. Other `text-decorations` include `overline`,`line-through`,and `underline` ([example](https://www.w3schools.com/css/tryit.asp?filename=trycss_text-decoration)). #### Text Tranformation ``` css pag { transformación de texto: capitalizar; } ``` The `text-transform` property is used to convert the entire text to `uppercase`,`lowercase` or to `capitilize` each word([example](https://www.w3schools.com/css/tryit.asp?filename=trycss_text-transform)). #### Letter Spacing The `letter-spacing` property sets the space between characters in a text. ``` css pag { espacio entre letras: 5px; } ``` #### Line Height The `line-height` property sets the space between two lines of text. ``` css pag { línea de altura: 5px; } ``` #### Word Spacing The `word-spacing` sets the space between words in a text. ``` css pag { espacio entre palabras: 5px; } \`\` \` #### Más información: [Texto CSS de W3Schools](https://w3schools.com/css/css_text.asp)