CSS Text - 11 Properties and its Values (Reference)

Tech:
Css
Since:
1 year ago
Views:
7

The CSS text properties are used to apply text styling to an element. It has a number of properties that can be used to control the appearance and behavior of the element.

text-align

Specifies the horizontal alignment of text.

text-align: left;
text-align: right;
text-align: center;
text-align: justify;
text-align: initial;
text-align: inherit;

text-align-last

Describes how the last line of a block or a line right before a forced line break is aligned when text-align is "justify".

text-align-last: auto;
text-align-last: left;
text-align-last: right;
text-align-last: center;
text-align-last: justify;
text-align-last: start;
text-align-last: end;
text-align-last: initial;
text-align-last: inherit;

text-decoration

Specifies the decoration added to text.

text-decoration: decoration-line decoration-color decoration-style;
text-decoration: initial;
text-decoration: inherit;

text-decoration-color

Specifies the color of the text-decoration.

text-decoration-color: color;
text-decoration-color: initial;
text-decoration-color: inherit;

text-decoration-line

Specifies the type of line in a text-decoration.

text-decoration-line: none;
text-decoration-line: underline;
text-decoration-line: overline;
text-decoration-line: line-through;
text-decoration-line: initial;
text-decoration-line: inherit;

text-decoration-style

Specifies the style of the line in a text decoration.

text-decoration-style: solid;
text-decoration-style: double;
text-decoration-style: dotted;
text-decoration-style: dashed;
text-decoration-style: wavy;
text-decoration-style: initial;
text-decoration-style: inherit;

text-indent

Specifies the indentation of the first line in a text-block.

text-indent: length;
text-indent: initial;
text-indent: inherit;

text-justify

Specifies the justification method used when text-align is "justify".

text-justify: auto;
text-justify: inter-word;
text-justify: inter-character;
text-justify: none;
text-justify: initial;
text-justify: inherit;

text-overflow

Specifies what should happen when text overflows the containing element.

text-overflow: clip;
text-overflow: ellipsis;
text-overflow: string;
text-overflow: initial;
text-overflow: inherit;

text-shadow

Adds shadow to text.

text-shadow: h-shadow v-shadow blur-radius color;
text-shadow: none;
text-shadow: initial;
text-shadow: inherit;

text-transform

Controls the capitalization of text.

text-transform: none;
text-transform: capitalize;
text-transform: uppercase;
text-transform: lowercase;
text-transform: initial;
text-transform: inherit;