VOOZH about

URL: https://www.geeksforgeeks.org/css/tailwind-css-font-family/

⇱ Tailwind CSS Font Family - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Tailwind CSS Font Family

Last Updated : 23 Jul, 2025

This class accepts a lot of font names in tailwind CSS in which all the properties are covered in class form.  It is the alternative to the CSS font-family property. This class is used to specify the font of an element. It can have multiple fonts as a backup system i.e. if the browser does not support one font then the other can be used.

Font family classes:

  • font-sans
  • font-serif 
  • font-mono

font-sans

This class is used to apply a websafe sans-serif font family, like ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", etc.

Syntax:

<element class="font-sans">...</element>

Example:

Output:

👁 Image

font-serif

This class is used to apply a websafe serif font-family like ui-serif, Georgia, Cambria, "Times New Roman", Times, serif, etc.

Syntax:

<element class="font-serif">...</element>

Example:

Output: 

👁 Image

font-mono

This class is used to apply a websafe monospaced font-family like ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, etc.

Syntax: 

<element class="font-mono">...</element>

Example:

Output:

👁 Image
Comment