
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
Text Transformation Working with CSS
The CSS text-transform property allows us to set text capitalization for an element. It can accept the following values: capitalize, lowercase, uppercase, full-width, full-size-kana and none.
Syntax
The syntax of CSS text-transform property is as follows −
Selector { text-transform: /*value*/ }
Example
The following examples illustrate CSS text-transform property −
<!DOCTYPE html> <html> <head> <style> h2 { text-transform: uppercase; } .demo { text-transform: lowercase; } q { text-transform: capitalize; font-style: italic; } </style> </head> <body> <h2>WordPress</h2> <q>WordPress is open source software you can use to create a beautiful website, blog, or app.</q> <p class="demo">34% of the web uses WordPress, from hobby blogs to the biggest news sites online.</p> </body> </html>
Output
This gives the following output −
Example
<!DOCTYPE html> <html> <head> <style> div { background-color: lightgreen; margin: auto; text-align: center; } p { width: 80%; background-color: aquamarine; text-decoration: uppercase; } article { background-color: darksalmon; text-transform: lowercase; } </style> </head> <body> <h2>What is Magento?</h2> <div> <p>Magento is an open-source e-commerce platform written in PHP.</p> <article> Build your own branded store powered by Magento Commerce and Amazon. Choose from 4,600 themes and extensions in the Magento Marketplace as well as more than 300,000 Magento developers. </article> </div> </body> </html>
Output
This gives the following output −
- Related Articles
- Text Transformation using CSS
- Text Indentation Working with CSS
- Setting Text Color Working with CSS
- Set Text Alignment Working with CSS
- Working with Inline CSS
- Working with CSS Units
- Working with element for CSS
- Working with CSS Overflow Property
- Working with CSS Pseudo Classes
- Display Inline Working with CSS
- Word Spacing Working with CSS
- Styling Links Working with CSS
- Styling Tables Working with CSS
- Working with CSS Display Property
- Working with Display Block in CSS

Advertisements