CSS text-transform
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The text-transform
CSS property transforms the case of an element's text content.
The following table summarizes the usages context and the version history of this property.
Default value: | none |
---|---|
Applies to: | All elements |
Inherited: | Yes |
Animatable: | No. See animatable properties. |
Version: | CSS 1, 2, 3 |
Syntax
The syntax of the property is given with:
The example below shows the text-transform
property in action.
Example
Try this code »p {
text-transform: capitalize;
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
capitalize |
Transforms the first character of each word in uppercase; other characters are unaffected. |
lowercase |
Transforms all characters of each word in lowercase. |
uppercase |
Transforms all characters of each word in uppercase. |
none |
No capitalization effects. The text renders as it is. This is default. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element text-transform property. |
Browser Compatibility
The text-transform
property is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: CSS Text, CSS Fonts.
Text-related properties: letter-spacing
, text-align
, text-decoration
, text-indent
, text-overflow
, text-shadow
, white-space
, word-spacing
.