Skip to main content


Show more

Foundation CSS Typography

Foundation CSS Typography

Typography plays a crucial role in web design, influencing readability, user experience, and visual appeal. Foundation CSS provides a comprehensive set of typography classes to style text elements and create harmonious typography across your website.

1. Headings

Foundation CSS offers classes for styling headings from h1 to h6, allowing you to apply consistent typography styles to your headings.

Example markup for headings:

<h1 class="h1">Heading 1</h1>
<h2 class="h2">Heading 2</h2>
<h3 class="h3">Heading 3</h3>
<h4 class="h4">Heading 4</h4>
<h5 class="h5">Heading 5</h5>
<h6 class="h6">Heading 6</h6>

2. Body Text

Foundation CSS provides classes for styling body text, including font size and line height adjustments for improved readability.

Example markup for body text:

<p class="lead">Lead paragraph with larger font size and increased line height.</p>
<p class="body-text">Standard body text with default font size and line height.</p>

3. Text Alignment

Foundation CSS offers classes for text alignment, allowing you to align text to the left, right, center, or justify it.

Example markup for text alignment:

<p class="text-left">Left-aligned text.</p>
<p class="text-right">Right-aligned text.</p>
<p class="text-center">Center-aligned text.</p>
<p class="text-justify">Justified text with even spacing between words.</p>

4. Font Styles

Foundation CSS includes classes for font styles such as bold, italic, uppercase, and lowercase.

Example markup for font styles:

<p class="font-bold">Bold text.</p>
<p class="font-italic">Italicized text.</p>
<p class="uppercase">Uppercase text.</p>
<p class="lowercase">Lowercase text.</p>

5. Text Color

Foundation CSS provides classes for applying text color to elements, allowing you to customize the color of text according to your design requirements.

Example markup for text color:

<p class="text-primary">Primary text color.</p>
<p class="text-secondary">Secondary text color.</p>
<p class="text-success">Success text color.</p>
<p class="text-danger">Danger text color.</p>


Foundation CSS typography classes offer a flexible and intuitive way to style text elements and create visually appealing typography across your website. By leveraging these classes, you can easily achieve consistent and aesthetically pleasing typography in your web projects.