Code has been added to clipboard!

The CSS Text-Transform Property

Reading time 1 min
Published Sep 8, 2017
Updated Oct 2, 2019

How to modify text capitalization

By using the CSS text-transform property, you can control the capitalization of the text:

Example
p.lowercase {
    text-transform: lowercase;
}

Syntax for CSS text transform

The syntax for this property is as follows:

text-transform: value;

See an example of using text-transform below:

Example

div.a {
    text-transform: uppercase;
}

div.b {
    text-transform: lowercase;
}

div.c {
    text-transform: capitalize;
}

The available values are explained in the table.

Value Description
none The default value. The text is rendered normally
capitalize Makes CSS capitalize the first letter of each word
uppercase Makes CSS capitalize all letters
lowercase No letters are capitalized
full-width All characters are written inside a square and can be aligned
full-size-kana All Kana characters are converted to full-size (used for ruby annotations)

Browser support

Chrome
1+
Edge
12+
Firefox
1+
IE
4+
Opera
7+
Safari
1+

Mobile browser support

Chrome
18+
Firefox
4+
Opera
11+
Safari
1+
CSS3 Features
Syntax
Stylesheets
Inline
Internal
External
Children Selectors
Fonts
Colors
Gradients
Opacity / Transparency
Shadow Effects
Layout — Display
Layout — Float
Responsive Web Design — Viewport
Responsive Web Design — Grid View
Responsive Web Design — Media Queries
Responsive Web Design — Flexbox Layout
Responsive Web Design — Images
Borders
Margin
Padding
Height
Links
Lists
Tables
Navigation Bar
Images
Forms
Buttons
Box-Sizing
Code Examples
@media
border-image
box-shadow
flex-shrink
margin
opacity
position
text-align
text-transform
word-wrap