on
CSS property text-transform controls capitalization effects of an element’s text
CSS property text-transform
CSS version: | CSS 2.1 |
Value: | capitalize | uppercase | lowercase | none | inherit |
Initial: | none |
Applies to: | all elements |
Inherited: | yes |
text-transform values
none | No capitalization |
capitalize | Puts the first character of each word in uppercase; other characters are unaffected. |
uppercase | Puts all characters of each word in uppercase. |
lowercase | Puts all characters of each word in lowercase. |
inherit | inherit value from parent |
Example – text-transform
<style>
span {margin: 5px; background-color:lightgray;}
.cap {text-transform: capitalize;}
.uc {text-transform: uppercase;}
.lc {text-transform: lowercase;}
</style>
<span class="cap">capitalize example</span>
<span class="uc">Uppercase example</span>
<span class="lc">Lowercase example example</span>
Related
Specification