Convert text to lowercase with CSS

To convert text to lowercase with CSS, we will be using the lowercase value of text-transform property.

Syntax

selector {
    text-transform: lowercase;
}

Example

In this example, we are using text-transform property and displaying the result as before and after the conversion using p tag.

<html>
<head>
    <style>
        #lcase {
            text-transform: lowercase;
        }
    </style>
</head>
<body>
    <h3>
        Convert Text to Lowercase with CSS
    </h3>
    <p>
        In this example we have used <strong>text-transform</strong> 
        property to convert the text to lowercase.
    </p>
    <hr>
    <p>This is a NORMAL text with Mixed CASes.</p>
    <h4>After Conversion to Lower Case:</h4>
    <p id="lcase">
        This is a NORMAL text with lower CASe.
    </p>
</body>
</html>

Output

The text "This is a NORMAL text with lower CASe." will be displayed as "this is a normal text with lower case." in the browser.

Key Points

The text-transform: lowercase property:

  • Converts all uppercase letters to lowercase
  • Leaves lowercase letters unchanged
  • Does not affect numbers or special characters
  • Only changes the visual display, not the actual HTML content

Conclusion

The text-transform: lowercase property provides a simple way to convert text to lowercase using only CSS. This method changes the visual appearance without modifying the original HTML content.

Updated on: 2026-03-15T23:18:59+05:30

4K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements