TUTORIALS

Bootstrap Typography Classes

Written By: Koushik S
Created at: 28-June-2023 20:36:19
Modified at: 28-June-2023 20:36:39
  • Default font-size of <body> and<p> elements is 14px
  • Line-height 1.428
  • <p>elements also has margin-bottom of half of its line-height (20px with 14px font), therefore 10px by default.
  • All elements like b, big, code, em, i, mark, small, strong, sub, sup, ins, del, s, u, abbr, address and blockquote (and small and cite inside) are properly styled
  • Vast majority of these classes are most often set to either paragraph, strong or em elements
Sl. No. Class Name Description
1. .page-header Class for a wrapping div of a heading. Adds some margin, padding and border-bottom
2. .h1
.h2
.h3
.h4
.h5
.h6
Makes an element look like heading of a chosen level
3. .lead For highlighting an element. Sets element's font-size to 21px, font-weight: 300, line-height: 1.4 and margin-bottom: 20px
4. .text-left
.text-center
.text-right
.text-justify
Aligns texts, usually paragraphs, with text-align CSS property
5. .text-nowrap Keeps the whole text with this class on a single line, no wrapping occurs because of white-space: nowrap CSS property of this class
6. .text-lowercase
.text-uppercase
.text-capitalize
Sets text-transform CSS property to make all characters inside the element with this class lowercase, uppercase or capitalized.
7. .text-muted Makes text grey
8. .text-primary Makes text blue
9. .text-success Makes text green
10. .text-info Makes text dark blue
11. .text-warning Makes text dark yellow
12. .text-danger Makes text red
There are no likes. Be the first one to like
Likes: 0
Comments: 0