Text Transformation using CSS

CSSWeb DevelopmentFront End Technology

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

raja
Published on 27-Dec-2019 14:22:30
Advertisements