CSS Text Formatting Properties
CSS Text
Formatting Properties
The CSS text formatting properties are used to format text style the text and
perform different types of manipulations like word spacing, alignment,
justification,
and text transformation.
Text Color:
This property is used to set the color of the text and the color can be set by
using a color name like “red”, hex value “#ff0000”, or by its RGB value
“rgb(255,0,0)”;
Output
Text-Align:
This property in CSS is used to specify the horizontal alignment of text in an
element inside a
block element or table-cell box.
CSS Code
Output
Text-Align-Last:
It is used to set the last line of the paragraph just before the line break. It sets
the alignment of all the last lines occurring in the element in which the text-
align-last property is
applied.
CSS Code
Output
Text-Decoration:
Text-decoration
property is used to “decorate” the content of the text.
CSS Code
Output
Text-Decoration-Color:
It is used to set the color of the decorations (over lines, underlines, and line-
through) over the
text.
CSS Code
Output
Text-Decoration-Line:
It is used to set the various kinds of text decorations. This may include many
values such as
underline, over line, line-through, etc.
CSS Code
Output
Text-Decoration-Style:
This property is used to set the text-decoration of the element. It is the
combination of the text-decoration-line and text-decoration-color properties.
CSS Code
Output
Text-Indent:
It is used to indent the first line of the paragraph and the size can be in px,
cm, pt.
CSS Code
Output
Text-Justify:
This property is used to set the text-align to justify. It spreads the words into
complete lines.
CSS Code
Output
Text-Overflow:
This property of text formatting specifies that some text has overflow and is
hidden from the view.
CSS Code
Output
Text-Transform:
It is used to control the capitalization of
the text.
CSS Code
Output
Text-Shadow:
it is used to add
shadow to the text.
CSS Code
Output
Letter-Spacing:
This property is used to specify the space
between the characters of the text.
CSS Code
Output
Line-Height:
It is used to set the
space between the lines.
CSS Code
Output
Direction:
This property is used
to set the direction of the text.
CSS Code
Output
Word-Spacing:
It is used to specify the space between the
words of the line.
CSS Code
Output
No comments: