Open In App
Related Articles

Tailwind CSS Text Transform

Improve Article
Improve
Save Article
Save
Like Article
Like

This class accepts more than one value in tailwind CSS. All the properties are covered in class form. It is the alternative to the CSS text-transform property. This class is used to control the capitalization of the text.

Text Transform classes:

  • uppercase 
  • lowercase 
  • capitalize 
  • normal-case 

uppercase: It is used to convert or transform all characters in each word into uppercase.

Syntax:

<element class="uppercase">...</element>

Example:

HTML




<!DOCTYPE html> 
<html>
<head
    <link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" 
          rel="stylesheet"
</head
  
<body class="text-center mx-4 space-y-2"
    <h1 class="text-green-600 text-5xl font-bold">
        GeeksforGeeks
    </h1
    <b>Tailwind CSS Text Transform Class</b
    <div class="mx-14 bg-green-200 p-4">
    <p class="uppercase"
        A Computer Science portal for Geeks
    </p>
   
    </div>
</body
  
</html


Output:

lowercase: It is used to convert or transform all characters in each word to lowercase.

Syntax:

<element class="lowercase">...</element>

Example:

HTML




<!DOCTYPE html> 
<html>
<head
    <link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" 
          rel="stylesheet"
</head
  
<body class="text-center mx-4 space-y-2"
    <h1 class="text-green-600 text-5xl font-bold">
        GeeksforGeeks
    </h1
    <b>Tailwind CSS Text Transform Class</b
    <div class="mx-14 bg-green-200 p-4">
    <p class="lowercase"
        A Computer Science portal for Geeks
    </p>
   
    </div>
</body
  
</html


Output:

capitalize:  It is used to transform the first character of each word to uppercase.

Syntax:

<element class="capitalize">...</element>

Example:

HTML




<!DOCTYPE html> 
<html>
<head
    <link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" 
          rel="stylesheet"
</head
  
<body class="text-center mx-4 space-y-2"
    <h1 class="text-green-600 text-5xl font-bold">
        GeeksforGeeks
    </h1
    <b>Tailwind CSS Text Transform Class</b
    <div class="mx-14 bg-green-200 p-4">
    <p class="capitalize"
        A Computer Science portal for Geeks
    </p>
   
    </div>
</body
  
</html


Output:

capitalize

normal-case: It has a default value. It has no capitalization.

Syntax:

<element class="normal-case">...</element>

Example:

HTML




<!DOCTYPE html> 
<html>
<head
    <link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" 
          rel="stylesheet"
</head
  
<body class="text-center mx-4 space-y-2"
    <h1 class="text-green-600 text-5xl font-bold">
        GeeksforGeeks
    </h1
    <b>Tailwind CSS Text Transform Class</b
    <div class="mx-14 bg-green-200 p-4">
    <p class="normal-case"
        A Computer Science portal for Geeks
    </p>
   
    </div>
</body
  
</html


Output:

normal case


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 23 Mar, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials