CSS Text
cssCSS provides a number of properties for styling text in your HTML documents. Here are some of the most common ones:
- color: This property allows you to specify the color of the text. You can specify the color using either a predefined color name, a hexadecimal color code, an RGB value, or an HSL value.
body {
color: red;
}
- text-align: This property allows you to specify how the text should be aligned within its containing element. The possible values are left, center, right, and justify.
body {
text-align: center;
}
- text-decoration: This property allows you to specify the appearance of decorative lines that are added to the text. The possible values are none, underline, overline, line-through, and blink.
body {
text-decoration: underline;
}
- text-transform: This property allows you to specify the case of the text. The possible values are none, capitalize, uppercase, and lowercase.
body {
text-transform: uppercase;
}
- text-indent: This property allows you to specify the amount of indentation that should be applied to the first line of text in a block. You can specify the indentation using either absolute or relative units.
body {
text-indent: 2em;
}
You can use these properties, either individually or in combination, to specify a wide range of text styles for your HTML elements. It’s a good idea to familiarize yourself with all of these properties so that you can choose the most appropriate ones for your needs.
Other Article on Tag css
- - css audio
- - CSS Backgrounds
- - CSS Borders
- - CSS Colors
- - CSS Cursors
- - CSS Dimension
- - css dropdown
- - css ellipsis
- - css em vs rem
- - CSS flex