The Wayback Machine - https://web.archive.org/web/20240118181327/https://www.geeksforgeeks.org/tailwind-css-text-transform/
Open In App
Related Articles

Tailwind CSS Text Transform

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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


Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

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!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 23 Mar, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials