CSS TEXT TRANSFORM


In CSS, the text-transform property can used to specify the case in a text. Using this property, we can specify the text to Upper Case or Lower Case.


Here's an example:


p {
  text-decoration: uppercase;
}
h3 {
  text-transform: lowercase;
}

Live Demo!


Output:

This is a sample paragraph. Text decoration is uppercase.

This is a sample heading. Text decoration is lowercase.



This property can also be used to capitalize the first letter of each word in a sentence:


p {
  text-transform: capitalize;
}

Live Demo!


Output:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.