Text Transform Property in CSS
Submitted by argie on Tuesday, March 18, 2014 - 09:49.
Text transform property is supported in any kind of browser. The primary function of this property is it allows you to transform your text into none, uppercase, capitalize and lower case format. To understand what this four property are, follow the steps bellow.
Make sure you follow all instruction to successfully run this tutorial.
Creating Our Display
The code Bellow will display the result of none, uppercase, capitalize and lower case format. Copy the code bellow and save it as “index.html”.- <style>
- </style>
- <p id="none">Here's how you use None property in text-transform</p>
- <p id="uppercase">Here's how you use None property in text-transform</p>
- <p id="lowercase">Here's how you use None property in text-transform</p>
- <p id="capitalize">Here's how you use None property in text-transform</p>
None Format
The text remain as it is, no changes can be seen in the div that is using the “none” format. Copy the code bellow and paste it inside the style tag in our “index.html”.- #none {
- text-transform : none;
- }
Uppercase Format
Transforms all characters to uppercase. All text in the div will be transformed into uppercase letter using the “uppercase” format. Copy the code bellow and paste it inside the style tag in our “index.html”.- #uppercase {
- text-transform : uppercase;
- }
Lowercase Format
Transforms all characters to lowercase. All text on the div will transformed into lowercase letter using the “lowercase” format. Copy the code bellow and paste it inside the style tag in our “index.html”.- #lowercase {
- text-transform : lowercase;
- }
Capitalize Format
Transforms the first character of each word to format. Copy the code bellow and paste it inside the style tag in our “index.html”.- #capitalize {
- text-transform : capitalize;
- }
Summary of the code
- <style>
- #none {
- text-transform : none;
- }
- #uppercase {
- text-transform : uppercase;
- }
- #lowercase {
- text-transform : lowercase;
- }
- #capitalize {
- text-transform : capitalize;
- }
- </style>
- <p id="none">Here's how you use None property in text-transform</p>
- <p id="uppercase">Here's how you use None property in text-transform</p>
- <p id="lowercase">Here's how you use None property in text-transform</p>
- <p id="capitalize">Here's how you use None property in text-transform</p>
Add new comment
- 27 views