What is the Bootstrap page header ?
Page header is used to add suitable spacing around the headings on a page and adds a horizontal line under the heading. This particularly helps a web page where you may have several post titles and need a way to add distinction to each of them. As header is always the first impression of the viewer. So, one would want that their page has a good-looking header at the top of the page and the header can be highlighted easily. For this purpose, a page header is used by the web developers which adds spacing around the headings on a page and adds a horizontal line under the heading.
Let’s see the step-by-step approach for the implementation.
Step 1: Include Bootstrap and jQuery CDN into the <head> tag before all other stylesheets to load our CSS.
<link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css”>
Step 2: Add <div> tag in the HTML body with class container.
Step 3: To use a page header, wrap your heading in a <div> with a class of .page-header.
<div class = "page-header"> </div>
Example 1: In this example, we will see how to use Bootstrap page header with underline heading.
Example 2: In this example, we will see page header with different size of headings and without underline.