Little Web Hut

CSS 2.1 Reference: text-transform Property

CSS text-transform Property
Syntax
selector {text-transform: value;}
  • value is specified by using one of the following keywords: capitalize, uppercase, lowercase, none, or inherit.
Usage

The text-transform property is used control the capitalization of text.

This property is specified by using a keyword according to the syntax shown above.


CSS Example: The text-transform properties are set to capitalize, uppercase, and lowercase.
  #tst1 {text-transform: capitalize;}
  #tst2 {text-transform: uppercase;}
  #tst3 {text-transform: lowercase;}
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style

Keywords
  • capitalize - Capitalizes the first letter of each word. The remaining text is not changed.
  • uppercase - Sets all of the text to uppercase.
  • lowercase - Sets all of the text to lowercase.
  • none - The text is not changed.
  • inherit - The inherit keyword is used to specify that the value for this property should be taken from the parent element. If inherit is used with the root element, then the initial value for this property will be used.
Applies To All elements
Inherited Yes
Initial Value none


text-transform Property Examples
Test It HTML StyleTest It HTML StyleTest It HTML5 StyleThe text-transform properties are set to capitalize, uppercase, and lowercase.