![]() |
VOOZH | about |
The text-transform property in CSS is used to change the capitalization style of text. It helps improve the presentation and formatting of webpage content.
text-transform: none| capitalize | uppercase | lowercase |initial | inherit; Here are the property values for the text-transform CSS property:
| Value | Description |
|---|---|
| none | Default value. No capitalization. |
| capitalize | Transforms the first character of each word to uppercase. |
| uppercase | Converts all characters in each word to uppercase. |
| lowercase | Converts all characters in each word to lowercase. |
| initial | Sets the property to its default value. |
Here are some examples of the CSS text-transform property that will help you clearly understand how it works:
Here, we are using the text-transform: none; property to display text in its original form without any capitalization changes. It demonstrates the default text transformation behavior in a paragraph.
Here, we are using the text-transform: capitalize; property to transform the first letter of each word to uppercase. It demonstrates this effect on paragraphs styled with the gfg class.
Here, we are using text-transform: uppercase; property to convert all characters in the paragraphs with the gfg class to uppercase. The heading remains in its original form.
Here, we are using text-transform: lowercase; property to convert all characters in the paragraphs with the gfg class to lowercase. The headings remain in their original form.
Here, we are using the the text-transform: initial; property to set the text transformation to its default value for paragraphs with the gfg class. The headings remain unchanged.