Text Transformation using CSS


For text transformation in CSS, use the text-transform property with the following values −

text-transform: none|capitalize|uppercase|lowercase|initial|inherit;

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
div {
   line-height: 1.9;
   text-transform: uppercase;
}
</style>
</head>
<body>
<h1>Demo Heading</h1>
<div>
<p>This is demo text.<br>
This is another demo text.
</p>
</div>
</body>
</html>

Output

Example

Let us see another example −

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
div {
   text-transform: lowercase;
}
</style>
</head>
<body>
<h1>Demo Heading</h1>
<div>
<p>THIS is demo text.<br>
This is ANOTHER demo text.
</p>
</div>
</body>
</html>

Output

Updated on: 27-Dec-2019

90 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements