text-transform is the CSS property that we use to specify the letter capitalization of our text.
taught by Tina May
We can transform all letters in a text element into uppercase.
text-transform:
Oh hey there fellas!
What's brewing, good looking?
You miss 100% of the shots you never take.
We can transform all letters in a text element into lowercase.
text-transform:
Oh hey there fellas!
What's brewing, good looking?
You miss 100% of the shots you never take.
We can transform the first letter of each word into uppercase, while the rest of them become lowercase.
text-transform:
Oh hey there fellas!
What's brewing, good looking?
You miss 100% of the shots you never take.
Select any property below and we’ll show you step-by-step how to use the property, with video demo, tips and practical examples you can code for yourself.
<div>
<h2>Oh hey guys!</h2>
<p>What's brewing, good looking?</p>
</div>
What's brewing, good looking?
h2 { text-transform: uppercase; }
p { text-transform: capitalize; }
Try changing the letter capitalization of both the heading and the paragraph we’ve added below.
You can change them into all uppercase, all lowercase, or just having the first letter as uppercase followed by lowercase letters.
Try these:
Copyright 2023