content

Tailwind CSS Typography

A comprehensive guide to typography, featuring examples of global settings, headings, body text, lists, and various other elements.

Inter is used for FlyonUI docs. To change or customize this, consult the font-family section in the TailwindCSS documentation.

Use of Tailwind CSS font size utility classes to style various headings.

The <p> tag is extensively employed in HTML documents for composing longer passages of text, typically separated by blank lines. Adhering to proper usage of this tag can notably improve on-page SEO performance.

Styling for common inline HTML5 elements.

ELEMENT (TAG)
DESCRIPTION
<mark>Used to highlight or mark text for emphasis or reference.
<del>Indicates text that should be treated as deleted or removed from the document.
<s>Represents text that is no longer relevant or accurate.
<ins>Marks text that has been added to the document.
<u>Renders text with an underline to indicate emphasis or annotation.
<small>Denotes text that should be displayed in a smaller font size, often used for fine print or side comments.
<strong>Renders text in a bold font to denote strong importance or emphasis.
<em>Renders text in italics to indicate emphasis or stress.

These HTML5 elements offer semantic significance to the content, effectively communicating specific intentions to both users and search engines.

Use the classes bg-clip-text, text-transparent, and bg-gradient-{tw-utility-class} to achieve a gradient overlay effect on a text element.

Apply styles to the initial line of a text block using the ::first-line pseudo-element, and to the first letter with the ::first-letter pseudo-element.

Conditional application of styles based on the open state of either a <details> or <dialog> element.

Use these text color utilities to automatically apply the correct text color based on the background or border color. This ensures good contrast and readability across different components and themes.

Class Name
Type
Description
text-bg-*ModifierUtility class used to apply both text color and background color based on semantic color schemes.
text-soft-bg-*ModifierUtility class used to apply both text color and a soft (lighter) background color using semantic color schemes.
text-border-*ModifierUtility class used to apply both text color and border color using semantic color schemes.

Use these semantic gradient background classes to create a smooth left-to-right gradient. The gradient starts with the semantic color on the left and transitions to a 20% darker shade on the right. This helps add depth and visual interest while maintaining consistency with your theme colors.

Class Name
Type
Description
gradient-bgComponentBase gradient background component that applies a neutral default gradient.
gradient-bg-primaryColorApplies a gradient background using the primary color scheme.
gradient-bg-secondaryColorApplies a gradient background using the secondary color scheme.
gradient-bg-accentColorApplies a gradient background using the accent color scheme.
gradient-bg-infoColorApplies a gradient background using the info color scheme, typically used for informational highlights.
gradient-bg-successColorApplies a gradient background using the success color scheme, often used to indicate positive status or confirmation.
gradient-bg-warningColorApplies a gradient background using the warning color scheme, commonly used to indicate caution or attention.
gradient-bg-errorColorApplies a gradient background using the error color scheme, typically used to indicate errors or critical issues.