HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Bootstrap 4 uses a default font-size of 16px, and its line-height is 1.5
Bootstrap 4 uses a default
font-size
of 16px, and its
line-height
is 1.5.
The default font-family
is "Helvetica Neue", Helvetica, Arial, sans-serif.
In addition, all <p>
elements have
margin-top: 0
and margin-bottom: 1rem
(16px by default).
Bootstrap 4 styles HTML headings (<h1>
to
<h6>
) with a bolder font-weight and
an increased font-size:
Display headings are used to stand out more than normal headings (larger
font-size and lighter font-weight), and there
are four classes to choose from: .display-1
, .display-2
, .display-3
, .display-4
In Bootstrap 4 the HTML <small>
element is used to create a lighter, secondary text in any heading:
Bootstrap 4 will style the HTML <mark>
element
with a yellow background color and some padding:
Use the mark element to highlight text.
Bootstrap 4 will style the HTML <abbr>
element
with a dotted border bottom:
The WHO was founded in 1948.
Add the .blockquote
class to a <blockquote>
when quoting blocks of content from another source:
For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
Bootstrap 4 will style the HTML <dl>
element in the following way:
Bootstrap 4 will style the HTML <code>
element in the following way:
The following HTML elements: span
, section
, and div
defines a section in a document.
Bootstrap 4 will style the HTML <kbd>
element in the following way:
Use ctrl + p to open the Print dialog box.
Bootstrap 4 will style the HTML <pre>
element in the following way:
The Bootstrap 4 classes below can be added to style HTML elements further:
Class | Description | Example |
---|---|---|
.font-weight-bold |
Bold text | Try it |
.font-weight-bolder |
Bolder text | Try it |
.font-italic |
Italic text | Try it |
.font-weight-light |
Light weight text | Try it |
.font-weight-lighter |
Lighter weight text | Try it |
.font-weight-normal |
Normal text | Try it |
.lead |
Makes a paragraph stand out | Try it |
.small |
Indicates smaller text (set to 80% of the size of the parent) | Try it |
.text-left |
Indicates left-aligned text | Try it |
.text-*-left |
Indicates left-aligned text on small, medium, large or xlarge screens | Try it |
.text-break |
Prevents long text from breaking layout | Try it |
.text-center |
Indicates center-aligned text | Try it |
.text-*-center |
Indicates center-aligned text on small, medium, large or xlarge screens | Try it |
.text-decoration-none |
Removes the underline from a link | Try it |
.text-right |
Indicates right-aligned text | Try it |
.text-*-right |
Indicates right-aligned text on small, medium, large or xlarge screens | Try it |
.text-justify |
Indicates justified text | Try it |
.text-monospace |
Monospaced text | Try it |
.text-nowrap |
Indicates no wrap text | Try it |
.text-lowercase |
Indicates lowercased text | Try it |
.text-reset |
Resets the color of a text or a link (inherits the color from its parent) | Try it |
.text-uppercase |
Indicates uppercased text | Try it |
.text-capitalize |
Indicates capitalized text | Try it |
.initialism |
Displays the text inside an <abbr> element in a slightly smaller font size |
Try it |
.list-unstyled |
Removes the default list-style and left margin on list items (works on both <ul> and <ol> ). This class only applies to immediate children list items (to remove the default list-style from any nested lists, apply this class to any nested lists as well) |
Try it |
.list-inline |
Places all list items on a single line (used together with
.list-inline-item on each <li> elements) |
Try it |
.pre-scrollable |
Makes a <pre> element scrollable |
Try it |
For a complete reference of all CSS classes available in Bootstrap 4, visit our Bootstrap 4 All Classes Reference.