Configuration (Optional)
// tailwind.config.js
module.exports = {
theme: {
extend: {
fontSize: {
'2xl': '1.75rem',
'3xl': '2rem',
},
},
},
// Other Tailwind configurations...
};
How to Customize the Font Size in Tailwind CSS ?
Customizing font size in Tailwind CSS involves using the text-[size]
utility class, where [size]
can be predefined size identifiers like xs
, sm
, md
, lg
, xl
, or numerical values. Additionally, you can extend the default font sizes in the configuration file for more customization.