CSS text-transform
property is used to transform element’s text to upper or lower or camel case. See the example below:
Example:
p.upper{ text-transform: uppercase; } p.camel{ text-transform: capitalize; } p.lower{ text-transform: lower; }
CSS Syntax
The text-transform
property has the following syntax:
text-transform: none|uppercase|capitalize|lowercase|initial|inherit;
Property Values
The text-transform
property accepts the following values:
none | Default Value. The text remains as it is. |
uppercase | Transforms the text to upper case. |
capitalize | Transforms the first letter of each word to upper case. |
lowercase | Transforms the text to lower case. |
initial | Sets the text-transform property to its default value. which is none. |
inherit | Inherits the text-transform value from its parent element. |
General Info
Default Value | none |
Inherited | Yes |
JavaScript Usage | element.style.textTransform = “uppercase” |