Skip to content
Tutorials Center
My learning

Topics

Lesson 51 of 58 ยท Projects

Project: Landing Page

Build a complete responsive landing page with Bootstrap 5: navbar, hero, feature grid, pricing cards, testimonials and footer, using only classes and no custom CSS.

A landing page has one job: explain a product in a few seconds and lead the visitor to a button. It is the perfect first Bootstrap project because it uses almost every layout idea you have learned, yet needs no JavaScript beyond the navbar toggle. In this project you build a page for a fictional note-taking app called Pebble, section by section, using Bootstrap classes only.

Each step below is a self-contained example that you can run and edit. At the end you will know how to join them into one page. You should be comfortable with the grid, the navbar, cards and spacing utilities before you start.

Plan the page

Before writing markup, decide the order of the sections. Visitors scan from the top, so each block answers one question in turn.

flowchart TD
  N["Navbar<br/>Where am I? How do I navigate?"] --> H["Hero<br/>What is it? Start now"]
  H --> F["Features<br/>Why is it good?"]
  F --> P["Pricing<br/>What does it cost?"]
  P --> T["Testimonials<br/>Do others trust it?"]
  T --> FO["Footer<br/>Links and legal"]

A landing page answers one question per section, from top to bottom.

Every section sits in its own <section> (or <header>/<footer>) with vertical padding such as py-5, and inside it a container. Repeating that pattern keeps the page consistent: the full-width band can have its own background, while the content stays at a readable width.

Step 1: responsive navbar and hero

The navbar uses navbar-expand-lg, so it collapses into a hamburger menu below 992 px. The hero is a full-width band with a headline, a lead paragraph and two buttons. The row inside it places text on the left and a simple illustration on the right at lg and above, and stacks them on phones.

Use <h1> once per page for the hero headline, and display-* classes for its size rather than a smaller heading tag; that keeps the heading outline correct for accessibility and search engines.

Navbar and hero

Open the lesson in a narrow window (below 992 px wide) and press the hamburger. d-grid gap-2 d-sm-flex is a handy trick for hero buttons: they are stacked full-width on tiny screens and sit side by side from sm up.

Step 2: features and pricing

The features block is a row with row-cols-1 row-cols-md-3, so one column on phones and three on tablets and up, each holding an icon tile, a heading and a sentence. Using row-cols-* means you add or remove features without touching column classes.

Pricing uses cards in the same pattern. Mark the recommended plan with a colored border, a header and a badge so it reads as the default choice, and keep the buttons at the bottom of each card by making the card a flex column. Use h-100 on cards in a row so they all have the same height.

Features and pricing

The key trick for aligned buttons is card-body d-flex flex-column plus mt-auto on the button: the auto margin pushes it to the bottom whatever the length of the list above it. The small inline style for the icon tiles is the only custom CSS in the page; in a real project you would put it into a shared class.

Testimonials build trust. Use blockquote with a figcaption-like footer for the author, and keep each quote short. Use row-cols-1 row-cols-lg-3 again so the layout stays predictable. The footer holds a few link columns and a legal line. On phones, columns stack automatically; col-6 col-md-3 is a useful pattern for link lists because two columns fit side by side even on a small screen.

Testimonials and footer

Putting it together

To build the finished page, create one HTML file, put the stylesheet link in the <head>, then paste the navbar, header, the two middle section blocks, testimonials, call-to-action and footer in that order inside <body>. Put the Bootstrap bundle <script> once, just before </body>, and add <meta name="viewport" content="width=device-width, initial-scale=1"> to the head (see Installing Bootstrap). Link targets such as #features and #pricing already match the section id values, so the menu scrolls to them.

Then polish:

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which classes give a features row one column on phones and three from the md breakpoint up?

    row-cols-1 sets one column per row by default (mobile first), and row-cols-md-3 changes it to three from md upward.
  2. 2. How do you keep the buttons of equal-height pricing cards aligned at the bottom?

    In a flex column, an auto top margin absorbs the free space and pushes the button down, whatever the content height.
  3. 3. Why use display-4 on the hero h1 instead of a smaller heading tag?

    Heading levels describe structure; display-* classes change appearance only, so you keep one h1 and a good outline.
  4. 4. What makes the navbar collapse into a hamburger menu below 992 px?

    navbar-expand-lg expands the links from the lg breakpoint (992 px) upward; below that, the collapse is shown behind the toggler.

Summary

  • A landing page is a stack of section bands, each with py-5 and a container, answering one question each.
  • navbar-expand-lg, row-cols-*, d-grid d-sm-flex and ratio handle most responsive needs without custom CSS.
  • Pricing cards use h-100, d-flex flex-column and mt-auto for aligned buttons; highlight the recommended plan with a border and badge.
  • Use h1 once, display-* for size, and blockquote for testimonials.
  • Load the stylesheet in the head, the script once before </body>, and match menu href values to section ids.

Next lesson: Project: Admin Dashboard.