Copyright © tutorialspoint.com

CSS - text-transform

previous next


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:

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


previous next

Copyright © tutorialspoint.com