Web | This Site

CSS Home
CSS Reference
Pseudo Classes & Elements
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# CSS - text-transform

## Description:

The text-transform property changes the capitalization of text within an element, or else directs the user agent to leave the capitalization "as is."

## Possible Values:

- capitalize: The first letter of each word in the element's text should be capitalized.
- uppercase: All of the characters in the element's text should be uppercase (capital letters).
- lowercase: All of the characters in the element's text should be lowercase.
- none: The capitalization of the element's text should not be altered.

## Applies to:

All the HTML elements.

## DOM Syntax:

object.style.textTransform="uppercase";

## Example:

Following is the example which demonstrates how to set the cases for a text using text-transform property.

    <p style="text-transform:capitalize;">
    This will be capitalized
    </p>
    <p style="text-transform:uppercase;">
    This will be in uppercase
    </p>
    <p style="text-transform:lowercase;">
    This will be in lowercase
    </p>

This will produce following result:

This will be capitalized This will be in uppercase This will be in lowercase

To Become more comfortable - Do Online Practice

Advertisement

Online Image Processing

Indian Baby Names