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;
}
Udacity
Pros
  • Simplistic design (no unnecessary information)
  • High-quality courses (even the free ones)
  • Variety of features
Main Features
  • Nanodegree programs
  • Suitable for enterprises
  • Paid certificates of completion
Coursera
Pros
  • Professional service
  • Flexible timetables
  • A variety of features to choose from
Main Features
  • Professional certificates of completion
  • University-level courses
  • Multiple Online degree programs
Datacamp
Pros
  • Great user experience
  • Offers quality content
  • Very transparent with their pricing
Main Features
  • Free certificates of completion
  • Focused on data science skills
  • Flexible learning timetable

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

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

Mobile browser support

Browser image
Chrome
18+
Browser image
Firefox
4+
Browser image
Opera
11+
Browser image
Safari
1+

Latest Udacity Coupon Found:

Verified STAFF PICK

75% OFF COURSES

Udacity Black Friday Offer

The best time to save on Udacity courses is now - follow this coupon to access a 75% Udacity Black Friday discount & enjoy learning at a very low cost!

Expiration date: 18/01/2021
3176 People Used
Only 97 Left
Rating
5.0