This class accepts lots of value in tailwind CSS in which all the properties are covered as in class form. It is the alternative to the CSS font-size property. This class is used to set the font size of the text in an HTML document.
Font size classes:
- text-xs: This class defines the text size as extra small.
- text-sm: This class defines the text size as small.
- text-base: This class defines the text size as base size.
- text-lg: This class defines the text size as large.
- text-xl: This class defines the text size as extra-large.
- text-2xl: This class defines the text size as 2 times extra-large.
- text-3xl: This class defines the text size as 3 times extra-large.
- text-4xl: This class defines the text size as 4 times extra-large.
- text-5xl: This class defines the text size as 5 times extra-large.
- text-6xl: This class defines the text size as 6 times extra-large.
- text-7xl: This class defines the text size as 7 times extra-large.
- text-8xl: This class defines the text size as 8 times extra-large.
- text-9xl: This class defines the text size as 9 times extra-large.
Note: Change the size in the component with the required size mentioned above.
Syntax:
<element class="text-size">...</element>
Example:
Output:
👁 Image