Book Image

Bootstrap for Rails

By : Syed F Rahman
Book Image

Bootstrap for Rails

By: Syed F Rahman

Overview of this book

Table of Contents (18 chapters)
Bootstrap for Rails
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 look like this in the browser:

There might be scenarios when you don't use a heading tag, but are able to achieve the same default style with...