View video tutorial

CSS Text Transformation

CSS

This is used to specify uppercase and lowercase letters in a text.

CSS Text Transformation.

➔ The text-transformation property is used to specify uppercase and lowercase letters in a text.

  • text-transform:  uppercase;
  • text-transform:  lowercase;
  • text-transform:  capitalize;

Syntax

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

Property values

Value Description
none No transformation is applied. This is default value.
capitalize Capitalizes the first character of each word.
uppercase Converts all characters to uppercase.
lowercase Converts all characters to lowercase.
initial Sets the property to its default value.
inherit The element inherits the property value from its parent element.

Example

#p1 {
  text-transform: uppercase;
}
#p2 {
  text-transform: lowercase;
}
#p3 {
  text-transform: capitalize;
}
Try it Now »

Click on the "Try it Now" button to see how it works.