O'Reilly logo

Bootstrap for Rails by Syed Fazle Rahman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling typography

When we talk about typography, we mean heading tags, paragraph tags, inline text elements, proper alignment, text transformations, and any text on your webpage.

Bootstrap comes with default styles for all the heading tags starting from <h1> to <h6>. If you want to create a heading tag in your HTML page, you can directly put the heading tag without any classes. Let's have a look at an example. Insert the following HTML elements inside the static website that was created previously:

<div class="container">
  <h1>Let's save the Earth.</h1>
  <h2>Let's save the Earth.</h2>
  <h3>Let's save the Earth.</h3>
  <h4>Let's save the Earth.</h4>
  <h5>Let's save the Earth.</h5>
  <h6>Let's save the Earth.</h6>
</div>

The output of the preceding code will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required