Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS text-transform property


May 06, 2021 CSS Reference Manual


Table of contents


Transform text in different elements:

h1 {text-transform:uppercase;}
h2 {text-transform:capitalize;}
p {text-transform:lowercase;}

Try it out . . .

Description of property definition and use

The text-transform property controls the case of the text.

Default: none
Inherited: yes
Version: CSS1
JavaScript syntax: object .style.textTransform="uppercase"


Browser support

The numbers in the table support the first browser version number of the property.

The number immediately before -webkit-, -ms- or -moz- is the first browser version number that supports the prefix property.

Attributes
animation-duration 43.0
3.0 -webkit-
10.0 16.0
5.0 -moz-
9.0
4.0 -webkit-
30.0
15.0 -webkit-
12.0 -o-

The property value

Value Describe
none Default. Define standard text with lowercase and capital letters.
capitalize Each word in the text begins with a capital letter.
uppercase Definitions are only capital letters.
lowercase Definitions have no capital letters, only lowercase letters.
inherit Specifies that the value of the text-transform property should be inherited from the parent element.