Complete Bootstrap Guide

By Himanshu Shekhar , 14 Mar 2022


Module 01 โ€“ Introduction to Bootstrap

Welcome to the world of Bootstrap โ€” a powerful, open-source front-end framework created by Twitter developers. It helps you design mobile-first, responsive, and beautiful websites quickly using pre-built HTML, CSS, and JavaScript components. In this module, youโ€™ll learn what Bootstrap is, why itโ€™s so popular, and how to install and use it effectively.

1.1 ๐ŸŒŸ What is Bootstrap?

Bootstrap is a free toolkit that provides ready-made classes for layout, typography, forms, buttons, modals, and many other UI elements. It allows developers to build web pages faster without writing CSS from scratch.

๐Ÿ’ก Example: Adding the class btn btn-primary instantly gives a blue styled button โ€” no need to write custom CSS!
  • โš™๏ธ Built with HTML, CSS, and JavaScript
  • ๐Ÿ“ฑ Mobile-first and responsive by design
  • ๐ŸŽจ Provides consistent look across all browsers
  • ๐Ÿงฉ Easy to customize using utility classes

1.2 โš™๏ธ Installing Bootstrap (CDN or Local)

You can use Bootstrap either via a CDN (Content Delivery Network) or by downloading it locally.

๐Ÿ”ธ Option 1: Using CDN (Easiest Way)

<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">

<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>

Just copy these two lines into your HTML <head> and </body> section. Youโ€™re ready to use Bootstrap classes instantly!

๐Ÿ”ธ Option 2: Local Installation

  1. Download Bootstrap from getbootstrap.com
  2. Extract the ZIP file in your project folder
  3. Link the CSS and JS files manually in your HTML page
๐Ÿš€ Tip: CDN is best for learning and small projects; Local is better for offline or custom work.

1.3 ๐Ÿ“‚ Bootstrap Folder Structure

When you download Bootstrap locally, youโ€™ll find these key folders:

FolderDescription
css/Contains Bootstrapโ€™s core CSS files
js/Contains Bootstrapโ€™s JavaScript bundle and plugins
scss/Used for custom themes and SCSS compiling
โšก Note: In Bootstrap 5+, jQuery is no longer required โ€” it uses pure JavaScript bundles.

1.4 ๐Ÿ—๏ธ Understanding Containers

The .container class is the heart of Bootstrapโ€™s layout system. It centers your content and applies proper padding for responsive designs.

<div class="container">
  <h1>Hello Bootstrap!</h1>
</div>
  • .container โ†’ fixed-width responsive container
  • .container-fluid โ†’ full-width layout (100%)
  • .container-{breakpoint} โ†’ changes width at specific screen sizes (e.g. .container-lg)
๐Ÿ’ก Tip: Use .container for centered pages and .container-fluid for dashboards or banners.

1.5 ๐Ÿงฑ Basic Page Setup

Letโ€™s create your first Bootstrap page structure. Save this as index.html and open it in your browser.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My First Bootstrap Page</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

  <div class="container mt-5">
    <h1 class="text-center text-primary">Welcome to Bootstrap!</h1>
    <p class="lead text-center">Your first responsive page is ready ๐Ÿš€</p>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
๐Ÿง  Recap: Youโ€™ve learned what Bootstrap is, how to install it, its folder structure, and created your first responsive page!

Module 02 โ€“ Bootstrap Grid System

The Grid System is the backbone of Bootstrapโ€™s layout design. It helps you build responsive web pages that look perfect on any device โ€” from mobile screens ๐Ÿ“ฑ to large desktop monitors ๐Ÿ’ป.

In this module, youโ€™ll learn how Bootstrapโ€™s grid works, how to create layouts using rows and columns, and how to control their alignment, spacing, and order across different screen sizes.

2.1 ๐Ÿงฑ Understanding Rows and Columns

The grid system divides the screen into 12 equal columns. You can use these columns to position content side by side. A combination of .container, .row, and .col classes creates the structure.

<div class="container">
  <div class="row">
    <div class="col">Column 1</div>
    <div class="col">Column 2</div>
    <div class="col">Column 3</div>
  </div>
</div>
๐Ÿ’ก Tip: Each row can have up to 12 column units. If you use .col-6 twice โ†’ thatโ€™s 6 + 6 = 12 (a full row).
ClassDescription
.containerCenters and adds padding to the layout
.rowCreates a horizontal group of columns
.colAutomatically adjusts column width

2.2 ๐Ÿ“ฑ Responsive Breakpoints (xs, sm, md, lg, xl, xxl)

Bootstrap uses breakpoints to make your layout adjust automatically based on screen size.

BreakpointPrefixMinimum Width
Extra Smallcol-<576px
Smallcol-sm-โ‰ฅ576px
Mediumcol-md-โ‰ฅ768px
Largecol-lg-โ‰ฅ992px
Extra Largecol-xl-โ‰ฅ1200px
Extra Extra Largecol-xxl-โ‰ฅ1400px
<div class="row">
  <div class="col-sm-6 col-lg-4">Column A</div>
  <div class="col-sm-6 col-lg-8">Column B</div>
</div>
๐Ÿง  Explanation: On small screens, each column takes 6 units (half width). On large screens, they become 4 + 8 units (one-third + two-thirds).

2.3 ๐Ÿงฉ Column Offsets and Order

Sometimes you want to shift a column or reorder them on different screens.

๐Ÿ”น Offset Example:

<div class="row">
  <div class="col-md-4 offset-md-2">Shifted Column</div>
</div>

The above code shifts the column 2 units to the right.

๐Ÿ”น Order Example:

<div class="row">
  <div class="col order-2">Second</div>
  <div class="col order-1">First</div>
</div>
โšก Tip: Use .order-* classes (1โ€“5) to reorder columns flexibly.

2.4 ๐Ÿงฌ Nesting Columns

You can place rows and columns inside another column to create more complex layouts.

<div class="row">
  <div class="col-md-8">
    <div class="row">
      <div class="col-6">Nested 1</div>
      <div class="col-6">Nested 2</div>
    </div>
  </div>
</div>
๐Ÿ’ก Remember: Always wrap nested columns inside a new .row for proper spacing.

2.5 ๐Ÿงฑ Real-Life Responsive Layout Example

Hereโ€™s a simple webpage structure using the Bootstrap grid system.

<div class="container">
  <div class="row mb-3">
    <div class="col-12 bg-primary text-white p-3 text-center">Header</div>
  </div>

  <div class="row">
    <div class="col-md-3 bg-light p-3">Sidebar</div>
    <div class="col-md-9 bg-white p-3">Main Content</div>
  </div>

  <div class="row mt-3">
    <div class="col-12 bg-dark text-white text-center p-2">Footer</div>
  </div>
</div>
๐ŸŽฏ Recap: - The Bootstrap grid is based on 12 columns. - Combine .row + .col for layouts. - Use .col-{breakpoint}-* for responsive behavior. - Nest and offset columns for complex layouts.

Module 03 โ€“ Typography & Text Utilities

Text plays a major role in how your website communicates with visitors. Bootstrap provides a wide range of typography classes that make it easy to style headings, paragraphs, colors, alignment, and spacing without writing extra CSS. In this module, weโ€™ll explore how to use Bootstrapโ€™s built-in text utilities to make your content look clean and professional. โœจ

3.1 ๐Ÿงพ Headings, Paragraphs, and Display Classes

Bootstrap includes all HTML heading tags (<h1> to <h6>) and paragraph styles, plus additional display classes for creating bold and impactful titles.

Tag / ClassExample OutputUsage
<h1> to <h6>Heading Levels 1โ€“6Define hierarchy of text
.h1 to .h6Styled as headings but used on other tagsApply heading style to non-heading tags
.display-1 to .display-6Extra-large headingsFor hero titles or banners
<h1>Main Heading</h1>
<p class="lead">This is a lead paragraph for emphasis.</p>
<h2 class="display-4 text-primary">Big Bold Title</h2>
๐Ÿ’ก Tip: Use .lead for highlighting introductory text and .display-* for hero section headings.

3.2 ๐Ÿ“ Text Alignment & Colors

You can align text easily using .text-start, .text-center, or .text-end. Bootstrap also includes contextual color utilities for text.

<p class="text-start text-primary">Left aligned blue text</p>
<p class="text-center text-success">Centered green text</p>
<p class="text-end text-danger">Right aligned red text</p>
๐ŸŽจ Color Utilities: text-primary, text-secondary, text-success, text-danger, text-warning, text-info, text-light, text-dark.

You can also use responsive alignment like .text-md-center to change alignment only on medium and larger screens.

3.3 ๐Ÿ“‹ Lists & Inline Text Elements

Bootstrap offers utilities to style unordered, ordered, and inline lists easily.

๐Ÿ”น Unstyled List:

<ul class="list-unstyled">
  <li>Home</li>
  <li>About</li>
  <li>Contact</li>
</ul>

๐Ÿ”น Inline List:

<ul class="list-inline">
  <li class="list-inline-item">Home</li>
  <li class="list-inline-item">Services</li>
  <li class="list-inline-item">Contact</li>
</ul>
๐Ÿ’ก Tip: Use .list-inline when you want navigation-like lists horizontally.

๐Ÿ”ธ Inline Text Elements

  • <mark> โ†’ Highlighted text
  • <del> โ†’ Deleted text
  • <ins> โ†’ Inserted text
  • <small> โ†’ Smaller text
  • <strong> โ†’ Bold text
  • <em> โ†’ Italic text

3.4 ๐Ÿ’ฌ Blockquotes & Text Emphasis

Blockquotes are used for quotations, testimonials, or highlighting a specific piece of text. Bootstrap styles them beautifully.

<blockquote class="blockquote">
  <p>โ€œThe best way to predict the future is to create it.โ€</p>
  <footer class="blockquote-footer">Peter Drucker</footer>
</blockquote>
๐Ÿ’ก Tip: Add .text-end to align quotes to the right and .blockquote-footer to display the author.

You can also emphasize parts of text using classes:

  • .fw-bold โ†’ Bold text
  • .fw-light โ†’ Light text
  • .fst-italic โ†’ Italic text
  • .text-uppercase โ†’ Uppercase
  • .text-lowercase โ†’ Lowercase
  • .text-capitalize โ†’ Capitalize words

3.5 ๐Ÿง  Text Utilities Summary & Best Practices

Bootstrapโ€™s text utilities give you quick control over alignment, color, weight, and spacing โ€” no need for custom CSS.

UtilityExampleDescription
.text-centerCenters text horizontallyUse for headlines or banners
.text-mutedLight gray textFor secondary info or captions
.fw-boldBold fontHighlight important info
.lh-lgIncreases line spacingMakes paragraphs more readable
๐Ÿš€ In short: Use Bootstrap text utilities to ensure your content looks readable, responsive, and consistent without writing extra CSS.

Module 04 โ€“ Colors, Backgrounds & Borders

Colors bring your website to life! ๐ŸŽจ Bootstrap provides a powerful system of text colors, background utilities, borders, and shadows โ€” all designed to make your website visually appealing and easy to customize. In this module, youโ€™ll learn how to use Bootstrapโ€™s color palette, apply background themes, and add borders with style.

4.1 ๐ŸŽจ Bootstrap Color System

Bootstrap includes a consistent set of predefined color classes that you can apply to text, backgrounds, buttons, or borders. These are based on a simple theme: primary, secondary, success, danger, warning, info, light, dark.

Color Class Usage Example
.text-primaryMain accent color (blue)Primary
.text-successFor success messagesSuccess
.text-dangerFor errors or warningsDanger
.text-warningFor caution or alertsWarning
.text-infoFor information messagesInfo
.text-mutedFor secondary or subtle textMuted
.text-darkDark colored textDark
.text-light bg-darkLight text on dark backgroundLight Text
๐Ÿ’ก Tip: You can use these same keywords for backgrounds and borders too โ€” like .bg-primary or .border-success.

4.2 ๐Ÿ–ผ๏ธ Background Utilities

Bootstrap offers predefined classes for background colors and gradients. These can be used on any block element to create visual sections or highlights.

<div class="p-3 mb-2 bg-primary text-white">Primary Background</div>
<div class="p-3 mb-2 bg-success text-white">Success Background</div>
<div class="p-3 mb-2 bg-warning text-dark">Warning Background</div>
<div class="p-3 mb-2 bg-dark text-light">Dark Background</div>
๐ŸŒŸ Gradient Tip: Add .bg-gradient for a smooth gradient effect. Example โ†’ class="bg-primary bg-gradient text-white p-3"

๐Ÿ“ฆ Combine Text and Background:

<p class="bg-info text-dark p-3 rounded">Information Box</p>
<p class="bg-danger text-white p-3 rounded">Error Message</p>

4.3 ๐Ÿงฑ Borders and Shadows

Borders can help separate content, create cards, or add focus to certain areas. Bootstrap provides .border utilities for all sides, colors, and rounded shapes.

๐Ÿ”ธ Basic Borders:

<div class="border p-3 mb-2">Default Border</div>
<div class="border border-primary p-3 mb-2">Primary Border</div>
<div class="border border-danger p-3 mb-2">Danger Border</div>

๐Ÿ”น Border Sides:

<div class="border-top border-success">Top Border</div>
<div class="border-start border-warning">Left Border</div>
<div class="border-end border-info">Right Border</div>
<div class="border-bottom border-dark">Bottom Border</div>
โšก Note: You can combine multiple classes like .border-2 and .rounded for thick and curved borders.

๐Ÿ”น Rounded Corners:

<div class="border border-primary rounded p-3">Rounded Corners</div>
<div class="border border-secondary rounded-circle p-5 text-center">Circle Border</div>

๐Ÿ”น Shadows:

Use shadow utilities to add depth and soft highlights.

<div class="shadow-sm p-3 mb-2 bg-body rounded">Small Shadow</div>
<div class="shadow p-3 mb-2 bg-body rounded">Regular Shadow</div>
<div class="shadow-lg p-3 mb-2 bg-body rounded">Large Shadow</div>
๐Ÿ’ก Tip: Shadows work best on light backgrounds for modern card-style layouts.

4.4 ๐Ÿงญ Opacity Utilities

Sometimes you may want to make elements semi-transparent. Use .opacity-* classes (values: 25, 50, 75, 100) to control visibility.

<div class="bg-primary p-3 opacity-75 text-white">75% Opacity</div>
<div class="bg-danger p-3 opacity-50 text-white">50% Opacity</div>
<div class="bg-warning p-3 opacity-25 text-dark">25% Opacity</div>
๐Ÿง  Pro Tip: Opacity affects the entire element (including text). For transparent backgrounds only, use RGBA colors or custom CSS.
๐Ÿš€ Recap:
โœ… Bootstrap offers 8 main theme colors for text, borders, and backgrounds.
โœ… Use .bg-*, .text-*, and .border-* for instant styling.
โœ… Add .rounded, .shadow, and .opacity-* for visual depth.
โœ… All utilities are responsive and easy to combine.

Module 05 โ€“ Buttons and Button Groups

Buttons are essential interactive elements that guide user actions โ€” like submitting forms, navigating pages, or triggering modals. Bootstrap provides a comprehensive button system that helps you create beautiful, responsive buttons quickly without custom CSS.

5.1 ๐ŸŽจ Button Variants

Bootstrap includes several color variants to match the frameworkโ€™s theme system. Each variant uses predefined classes to style a <button> or <a> element.

<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>
<button type="button" class="btn btn-link">Link</button>
๐Ÿ’ก Tip: You can use <a href="#" class="btn btn-primary"> instead of <button> if you prefer a link that looks like a button.

5.2 ๐Ÿงฑ Outline Buttons

Outline buttons provide a clean, lightweight appearance using only a border and text color โ€” perfect for secondary or neutral actions.

<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-success">Success</button>
<button type="button" class="btn btn-outline-danger">Danger</button>
<button type="button" class="btn btn-outline-dark">Dark</button>
โšก Note: Hovering over an outline button fills it with its respective color automatically.

5.3 ๐Ÿ“ Button Sizes & States

Buttons can be resized and adjusted for different UI contexts. Use .btn-lg for large and .btn-sm for small.

<button class="btn btn-primary btn-lg">Large Button</button>
<button class="btn btn-success">Default Button</button>
<button class="btn btn-danger btn-sm">Small Button</button>

๐Ÿ”น Disabled State:

<button class="btn btn-secondary" disabled>Disabled</button>
<a href="#" class="btn btn-danger disabled" tabindex="-1" aria-disabled="true">Disabled Link</a>
โœ… Tip: For accessibility, always include aria-disabled="true" when disabling links styled as buttons.

5.4 ๐Ÿงฉ Button Groups & Toolbars

Button groups allow you to combine multiple buttons on a single line, while toolbars group multiple sets of buttons together.

๐Ÿ”ธ Button Group Example:

<div class="btn-group" role="group">
  <button type="button" class="btn btn-primary">Left</button>
  <button type="button" class="btn btn-primary">Middle</button>
  <button type="button" class="btn btn-primary">Right</button>
</div>

๐Ÿ”น Toolbar Example:

<div class="btn-toolbar" role="toolbar">
  <div class="btn-group me-2" role="group">
    <button class="btn btn-secondary">1</button>
    <button class="btn btn-secondary">2</button>
    <button class="btn btn-secondary">3</button>
  </div>
  <div class="btn-group" role="group">
    <button class="btn btn-danger">Delete</button>
  </div>
</div>

๐Ÿ”น Vertical Group:

<div class="btn-group-vertical">
  <button class="btn btn-outline-dark">Top</button>
  <button class="btn btn-outline-dark">Middle</button>
  <button class="btn btn-outline-dark">Bottom</button>
</div>
๐Ÿ’ก Pro Tip: Combine .btn-group with icons or dropdowns for toolbar-style controls.
๐Ÿš€ Recap:
โœ… Use .btn + color classes to create buttons instantly.
โœ… Outline buttons (.btn-outline-*) are perfect for minimalist UIs.
โœ… Adjust size with .btn-sm / .btn-lg.
โœ… Group buttons using .btn-group or toolbars for organized actions.

Module 06 โ€“ Images, Figures & Media Objects

Images make web pages engaging, but they must be responsive and visually consistent. Bootstrap provides ready-made classes for managing image size, alignment, borders, and captions. Youโ€™ll also learn about media objects โ€” a simple yet powerful layout component that combines text and images (like comments, blog posts, or product reviews). ๐ŸŒŸ

6.1 ๐Ÿงญ Responsive Images

Bootstrapโ€™s .img-fluid class makes your images automatically scale with the size of their container. This ensures your images look great on every screen โ€” mobile, tablet, or desktop.

<img src="example.jpg" class="img-fluid" alt="Responsive Image">
๐Ÿ’ก Tip: The .img-fluid class applies max-width: 100%; and height: auto;, so the image never overflows its parent container.

๐Ÿ“ Fixed vs Responsive:

  • Without .img-fluid: The image keeps its original size and may overflow small screens.
  • With .img-fluid: The image automatically adjusts to fit any screen width.

6.2 ๐Ÿ–ผ๏ธ Image Thumbnails

Thumbnails are small, rounded or bordered versions of images used in galleries, profiles, or previews. Use .img-thumbnail for this effect.

<img src="photo.jpg" class="img-thumbnail" alt="Thumbnail Example">
๐ŸŒŸ Bonus: Combine .img-fluid + .img-thumbnail for a responsive, framed image that fits any layout beautifully.

๐ŸŽจ Example:

<img src="profile.jpg" class="img-fluid img-thumbnail rounded-circle" alt="User Avatar">

6.3 ๐Ÿชถ Figures with Captions

Bootstrapโ€™s <figure> and <figcaption> elements make it easy to include descriptive captions under your images. Add .figure and .figure-caption for proper styling.

<figure class="figure">
  <img src="nature.jpg" class="figure-img img-fluid rounded" alt="Beautiful Nature">
  <figcaption class="figure-caption text-center">A peaceful view of nature.</figcaption>
</figure>
๐Ÿ’ฌ Tip: You can align the caption using text classes like .text-start, .text-center, or .text-end.

This method is commonly used for portfolio images, educational diagrams, or photography websites.

6.4 ๐Ÿ’ฌ Media Object Layouts

A media object is a layout pattern that places an image or icon beside some text. Itโ€™s great for testimonials, comments, blog previews, or product details.

<div class="media">
  <img src="user.jpg" class="align-self-start me-3 rounded-circle" alt="User" width="80">
  <div class="media-body">
    <h5 class="mt-0">John Doe</h5>
    <p>Bootstrap makes building responsive designs easy and elegant. This layout combines images and text seamlessly.</p>
  </div>
</div>
๐Ÿง  Note: The .media class was replaced by Flex utilities in Bootstrap 5, but you can recreate the same effect using .d-flex.

โœ… Modern Bootstrap 5 Version:

<div class="d-flex align-items-start">
  <img src="avatar.jpg" class="flex-shrink-0 me-3 rounded-circle" width="80" alt="User">
  <div>
    <h5>Jane Smith</h5>
    <p>This example uses Bootstrap 5 flexbox utilities instead of the old media component.</p>
  </div>
</div>
๐Ÿ’ก Pro Tip: Combine .align-items-center and spacing utilities (.me-3, .mt-2) to create neat, aligned layouts for testimonials or reviews.
๐Ÿš€ Recap:
โœ… .img-fluid โ†’ Makes images responsive.
โœ… .img-thumbnail โ†’ Adds a border and padding for framed images.
โœ… <figure> + .figure-caption โ†’ Perfect for captions and photo credits.
โœ… .d-flex โ†’ Replaces .media for image-text layouts in Bootstrap 5.
๐Ÿง  Combine these utilities to create elegant, adaptive visual designs easily.

Module 07 โ€“ Tables

Tables allow you to organize data neatly into rows and columns. Bootstrap offers a rich set of table utilities for styling, responsiveness, color variants, borders, and hover effects โ€” all without writing a single line of custom CSS! ๐Ÿช„

7.1 ๐Ÿ“‹ Table Basics

To start using tables in Bootstrap, simply wrap your HTML table with the class .table. This adds padding, borders, and text alignment for readability.

<table class="table">
  <thead>
    <tr>
      <th>#</th>
      <th>Name</th>
      <th>Email</th>
      <th>Country</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>John Doe</td>
      <td>john@example.com</td>
      <td>USA</td>
    </tr>
    <tr>
      <td>2</td>
      <td>Jane Smith</td>
      <td>jane@example.com</td>
      <td>UK</td>
    </tr>
  </tbody>
</table>
๐Ÿ’ก Tip: Add .table to any table element for instant Bootstrap formatting.

7.2 ๐ŸŽจ Table Variants

Bootstrap provides several table color schemes for quick styling โ€” including striped, bordered, hover, and contextual classes.

๐Ÿ”น Striped Rows

<table class="table table-striped"> ... </table>

๐Ÿ”น Bordered Table

<table class="table table-bordered"> ... </table>

๐Ÿ”น Hover Effect

<table class="table table-hover"> ... </table>

๐Ÿ”น Color Variants

<table class="table table-success"> ... </table>
<table class="table table-danger"> ... </table>
<table class="table table-warning"> ... </table>
<table class="table table-info"> ... </table>
โšก Note: You can also color individual rows or cells using classes like .table-success or .table-danger.

7.3 ๐Ÿ“ฑ Responsive Tables

On small screens, wide tables can cause horizontal overflow. Bootstrapโ€™s .table-responsive class wraps your table in a scrollable container, allowing users to scroll horizontally without breaking layout.

<div class="table-responsive">
  <table class="table table-bordered">
    <thead>
      <tr><th>#</th><th>Name</th><th>Email</th><th>Address</th><th>Country</th></tr>
    </thead>
    <tbody>
      <tr><td>1</td><td>Alice</td><td>alice@example.com</td><td>123 Elm Street</td><td>Canada</td></tr>
      <tr><td>2</td><td>Bob</td><td>bob@example.com</td><td>456 Pine Ave</td><td>USA</td></tr>
    </tbody>
  </table>
</div>
๐ŸŒŸ Pro Tip: You can use .table-responsive-sm, .table-responsive-md, etc. to make the scroll effect appear only on smaller breakpoints.

7.4 โš™๏ธ Advanced Styling: Striped, Hover & Bordered Combo

Combine multiple table utilities for a polished and modern design. Hereโ€™s an example combining stripes, hover effect, and borders ๐Ÿ‘‡

<table class="table table-striped table-hover table-bordered align-middle">
  <thead class="table-dark">
    <tr>
      <th>ID</th>
      <th>Student Name</th>
      <th>Course</th>
      <th>Marks</th>
      <th>Status</th>
    </tr>
  </thead>
  <tbody>
    <tr class="table-success">
      <td>1</td>
      <td>Ravi Kumar</td>
      <td>Web Development</td>
      <td>88%</td>
      <td>Passed</td>
    </tr>
    <tr class="table-warning">
      <td>2</td>
      <td>Sneha Patel</td>
      <td>UI Design</td>
      <td>60%</td>
      <td>Average</td>
    </tr>
    <tr class="table-danger">
      <td>3</td>
      <td>Aman Verma</td>
      <td>Cyber Security</td>
      <td>45%</td>
      <td>Failed</td>
    </tr>
  </tbody>
</table>
๐Ÿ’ก Use Cases:
- Student result sheets ๐Ÿงพ
- Pricing tables ๐Ÿ’ฐ
- Admin dashboards ๐Ÿ“Š
- Sales or customer data lists ๐Ÿงโ€โ™‚๏ธ
๐Ÿš€ Recap:
โœ… .table gives instant professional styling.
โœ… Use .table-striped, .table-hover, .table-bordered for clean UI.
โœ… Wrap tables in .table-responsive for mobile-friendly layouts.
โœ… Color individual rows with .table-success, .table-danger, etc.
โœ… Combine multiple utilities for advanced table designs.

Module 08 โ€“ Forms and Form Controls

Forms are how users interact with your website โ€” login, registration, feedback, contact, search, and more. Bootstrap 5 makes form design incredibly easy and beautiful with built-in spacing, layout, and validation utilities. In this module, youโ€™ll learn all about form structure, input groups, floating labels, selects, checkboxes, and validation. ๐Ÿ’ช

8.1 ๐Ÿงฉ Form Structure & Layout

Every form starts with a simple structure of <form> elements like input, label, and button. Bootstrap provides spacing and alignment automatically using classes like .mb-3 (margin bottom).

<form>
  <div class="mb-3">
    <label for="email" class="form-label">Email address</label>
    <input type="email" class="form-control" id="email" placeholder="Enter your email">
  </div>

  <div class="mb-3">
    <label for="password" class="form-label">Password</label>
    <input type="password" class="form-control" id="password" placeholder="Enter your password">
  </div>

  <button type="submit" class="btn btn-primary">Login</button>
</form>
๐Ÿ’ก Tip: Use .form-label for labels and .form-control for input fields โ€” Bootstrap automatically adjusts width and padding.

๐Ÿ“ Inline Forms (Horizontal Layout)

<form class="row g-3 align-items-center">
  <div class="col-auto">
    <input type="text" class="form-control" placeholder="Search...">
  </div>
  <div class="col-auto">
    <button type="submit" class="btn btn-success">Search</button>
  </div>
</form>

8.2 ๐Ÿ”„ Input Groups & Floating Labels

Input groups combine text, icons, or buttons inside a single input field. Perfect for email, currency, or search bars.

<div class="input-group mb-3">
  <span class="input-group-text">@</span>
  <input type="text" class="form-control" placeholder="Username">
</div>

<div class="input-group mb-3">
  <input type="text" class="form-control" placeholder="Amount">
  <span class="input-group-text">โ‚น</span>
</div>
๐ŸŒŸ Pro Tip: You can place buttons, icons, or dropdowns inside input groups.

๐Ÿ’ง Floating Labels

Floating labels are a modern way to show input names that move up when users type. Use .form-floating with <label> placed after the input.

<div class="form-floating mb-3">
  <input type="email" class="form-control" id="floatingEmail" placeholder="Email">
  <label for="floatingEmail">Email address</label>
</div>

<div class="form-floating">
  <input type="password" class="form-control" id="floatingPassword" placeholder="Password">
  <label for="floatingPassword">Password</label>
</div>
๐Ÿ’ก Tip: Floating labels require a placeholder value (even if empty) to work correctly.

8.3 โœ… Checkboxes, Radios & Selects

Bootstrap gives you elegant controls for user selection โ€” from checkboxes and radio buttons to dropdown selects.

๐Ÿ”น Checkboxes

<div class="form-check">
  <input class="form-check-input" type="checkbox" id="subscribe">
  <label class="form-check-label" for="subscribe">
    Subscribe to newsletter
  </label>
</div>

๐Ÿ”น Radio Buttons

<div class="form-check">
  <input class="form-check-input" type="radio" name="gender" id="male" checked>
  <label class="form-check-label" for="male">Male</label>
</div>

<div class="form-check">
  <input class="form-check-input" type="radio" name="gender" id="female">
  <label class="form-check-label" for="female">Female</label>
</div>

๐Ÿ”น Select Dropdown

<select class="form-select">
  <option selected>Choose your country</option>
  <option value="1">India</option>
  <option value="2">USA</option>
  <option value="3">Canada</option>
</select>
๐Ÿง  Note: Add .form-select-sm or .form-select-lg for size variations.

8.4 ๐Ÿง  Form Validation

Form validation helps ensure users enter correct information. Bootstrap provides client-side validation styles that highlight fields in green or red.

<form class="needs-validation" novalidate>
  <div class="mb-3">
    <label for="validationEmail" class="form-label">Email</label>
    <input type="email" class="form-control" id="validationEmail" required>
    <div class="valid-feedback">Looks good!</div>
    <div class="invalid-feedback">Please enter a valid email.</div>
  </div>

  <button class="btn btn-primary" type="submit">Submit</button>
</form>

<script>
(() => {
  'use strict';
  const forms = document.querySelectorAll('.needs-validation');
  Array.from(forms).forEach(form => {
    form.addEventListener('submit', event => {
      if (!form.checkValidity()) {
        event.preventDefault();
        event.stopPropagation();
      }
      form.classList.add('was-validated');
    }, false);
  });
})();
</script>
โœ… Pro Tip: Use .valid-feedback and .invalid-feedback messages to show hints directly under each input.

8.5 ๐Ÿ“‚ File Inputs

File inputs allow users to upload files (images, PDFs, etc.). Bootstrapโ€™s .form-control automatically styles them nicely.

<div class="mb-3">
  <label for="formFile" class="form-label">Upload your profile picture</label>
  <input class="form-control" type="file" id="formFile">
</div>
โšก Note: File inputs can also be customized with JavaScript plugins for previews or drag-and-drop functionality.
๐Ÿš€ Recap:
โœ… .form-control โ†’ Standard text, password, or email input fields.
โœ… .input-group โ†’ Combine inputs with icons or buttons.
โœ… .form-floating โ†’ Modern floating label layout.
โœ… .form-check & .form-select โ†’ Checkboxes, radios, and dropdowns.
โœ… Validation helps users correct mistakes quickly.
โœ… All form controls are responsive and accessible out-of-the-box.

Module 09 โ€“ Cards & Card Layouts

Cards are flexible containers that group related information โ€” like product details, user profiles, or blog posts. Each card can include images, titles, text, buttons, and even entire layouts. Bootstrapโ€™s card system is lightweight, responsive, and perfect for almost any project. ๐ŸŽฏ

9.1 ๐Ÿงฑ Basic Card Structure

A Bootstrap card starts with the .card class. Inside, you can add a .card-body to hold text, buttons, and more.

<div class="card" style="width: 18rem;">
  <div class="card-body">
    <h5 class="card-title">NotesTime Course</h5>
    <p class="card-text">
      Learn Bootstrap with hands-on modules and examples.  
      Perfect for beginners and developers alike!
    </p>
    <a href="#" class="btn btn-primary">Start Learning</a>
  </div>
</div>
๐Ÿ’ก Tip: Always wrap text inside .card-body for proper padding and alignment.

9.2 ๐Ÿ–ผ๏ธ Card with Images

Cards often include an image at the top or bottom. Use .card-img-top or .card-img-bottom to position images correctly.

<div class="card" style="width: 18rem;">
  <img src="course.jpg" class="card-img-top" alt="Course Image">
  <div class="card-body">
    <h5 class="card-title">Web Development</h5>
    <p class="card-text">Learn HTML, CSS, and Bootstrap step by step.</p>
    <a href="#" class="btn btn-success">Explore</a>
  </div>
</div>
โšก Note: Use high-quality, optimized images to avoid layout stretching.

9.3 ๐Ÿ—‚๏ธ Card Groups & Decks

To display multiple cards side-by-side, use .card-group or .card-deck (Bootstrap 4) โ€” in Bootstrap 5, use grid system or flex utilities for responsive card layouts.

<div class="row row-cols-1 row-cols-md-3 g-4">
  <div class="col">
    <div class="card h-100">
      <img src="html.jpg" class="card-img-top" alt="HTML">
      <div class="card-body">
        <h5 class="card-title">HTML Basics</h5>
        <p class="card-text">Understand structure and tags.</p>
      </div>
    </div>
  </div>
  <div class="col">
    <div class="card h-100">
      <img src="css.jpg" class="card-img-top" alt="CSS">
      <div class="card-body">
        <h5 class="card-title">CSS Styling</h5>
        <p class="card-text">Design with colors and layouts.</p>
      </div>
    </div>
  </div>
  <div class="col">
    <div class="card h-100">
      <img src="bootstrap.jpg" class="card-img-top" alt="Bootstrap">
      <div class="card-body">
        <h5 class="card-title">Bootstrap Components</h5>
        <p class="card-text">Build fast and responsive websites.</p>
      </div>
    </div>
  </div>
</div>
๐ŸŒŸ Pro Tip: Add class="h-100" to each card for equal heights in rows.

9.4 ๐ŸŒ„ Card Overlays

Overlays let you display text over an image โ€” great for banners, blog headers, or featured articles.

<div class="card bg-dark text-white">
  <img src="banner.jpg" class="card-img" alt="Banner">
  <div class="card-img-overlay">
    <h5 class="card-title">Welcome to NotesTime</h5>
    <p class="card-text">Learn front-end development with live examples.</p>
    <p class="card-text"><small>Updated just now</small></p>
  </div>
</div>
๐Ÿ’ก Tip: Overlays look great when paired with .bg-dark and .text-white for readability.

9.5 ๐Ÿงญ Image + Text Cards (Practical Layout)

Hereโ€™s a real-world example of using cards for displaying blog posts or products.

<div class="card mb-3" style="max-width: 540px;">
  <div class="row g-0">
    <div class="col-md-4">
      <img src="laptop.jpg" class="img-fluid rounded-start" alt="Laptop">
    </div>
    <div class="col-md-8">
      <div class="card-body">
        <h5 class="card-title">Learn Bootstrap Step-by-Step</h5>
        <p class="card-text">
          This structured guide helps you master responsive design easily with examples and projects.
        </p>
        <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
      </div>
    </div>
  </div>
</div>
โšก Note: Use the grid system inside cards for flexible side-by-side image and text layouts.
๐Ÿš€ Recap:
โœ… .card โ†’ Create clean, content boxes.
โœ… .card-img-top / .card-img-bottom โ†’ Add images.
โœ… .row-cols-* โ†’ Create responsive grids of cards.
โœ… .card-img-overlay โ†’ Display text over images.
โœ… Combine grid & flex utilities for advanced card layouts.
๐Ÿง  Perfect for blogs, products, portfolios, and dashboards!

Module 10 โ€“ Navbar & Navigation

The Bootstrap Navbar is a responsive, flexible, and mobile-first component that helps organize links, dropdowns, search boxes, and branding. It automatically adapts to different screen sizes using Bootstrapโ€™s powerful collapse system. Letโ€™s learn how to build your own navigation bar step by step ๐Ÿงญ

10.1 ๐Ÿ—๏ธ Navbar Basics

A basic Bootstrap navbar includes a brand name and simple links. You can customize the color, background, and padding easily using classes.

<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">NotesTime</a>
    <ul class="navbar-nav me-auto mb-2 mb-lg-0">
      <li class="nav-item"><a class="nav-link active" href="#">Home</a></li>
      <li class="nav-item"><a class="nav-link" href="#">Courses</a></li>
      <li class="nav-item"><a class="nav-link" href="#">About</a></li>
      <li class="nav-item"><a class="nav-link" href="#">Contact</a></li>
    </ul>
  </div>
</nav>
๐Ÿ’ก Tip: Use .navbar-light bg-light for a light theme or .navbar-dark bg-dark for a dark one.

10.2 ๐Ÿ“ฑ Responsive Navbar (Collapsible Menu)

Bootstrap automatically converts your navbar into a collapsible โ€œhamburger menuโ€ on smaller screens using .navbar-expand-lg and .collapse classes.

<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">NotesTime</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarMenu">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarMenu">
      <ul class="navbar-nav me-auto mb-2 mb-lg-0">
        <li class="nav-item"><a class="nav-link active" href="#">Home</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Modules</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Projects</a></li>
      </ul>
      <form class="d-flex">
        <input class="form-control me-2" type="search" placeholder="Search">
        <button class="btn btn-light" type="submit">Go</button>
      </form>
    </div>
  </div>
</nav>
โœ… Pro Tip: .navbar-expand-lg โ†’ expands on large screens and collapses on smaller ones. You can also use md or xl for other breakpoints.

10.3 ๐Ÿ”ฝ Navbar with Dropdowns

Dropdowns are a key feature of navbars, letting you organize multiple related links under one menu item.

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">Bootstrap Course</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarDropdown">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarDropdown">
      <ul class="navbar-nav me-auto">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="courseMenu" role="button" data-bs-toggle="dropdown">
            Modules
          </a>
          <ul class="dropdown-menu" aria-labelledby="courseMenu">
            <li><a class="dropdown-item" href="#">HTML Basics</a></li>
            <li><a class="dropdown-item" href="#">CSS Styling</a></li>
            <li><a class="dropdown-item" href="#">Bootstrap Advanced</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</nav>
โšก Note: Dropdowns require Bootstrapโ€™s JavaScript bundle (make sure bootstrap.bundle.min.js is included).

10.4 ๐ŸŽจ Navbar Colors & Customization

Bootstrap offers built-in color themes for navbars: bg-primary, bg-dark, bg-light, bg-success, etc. You can also customize with your own CSS or Bootstrap variables.

<nav class="navbar navbar-expand-lg navbar-dark bg-success">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">NotesTime</a>
    <ul class="navbar-nav">
      <li class="nav-item"><a class="nav-link active" href="#">Dashboard</a></li>
      <li class="nav-item"><a class="nav-link" href="#">Internships</a></li>
      <li class="nav-item"><a class="nav-link" href="#">Blog</a></li>
    </ul>
  </div>
</nav>
๐Ÿ’ก Pro Tip: You can add gradient backgrounds or shadows using utility classes like .shadow-sm, .bg-gradient, or custom CSS variables.

โœจ Example: Custom Shadowed Navbar

<nav class="navbar navbar-expand-lg navbar-dark bg-dark shadow-lg">
  <a class="navbar-brand ms-3" href="#">NotesTime Pro</a>
</nav>
๐Ÿš€ Recap:
โœ… .navbar โ†’ creates responsive navigation bars.
โœ… .navbar-expand-lg โ†’ controls when the menu collapses.
โœ… .dropdown-menu โ†’ adds dropdown items.
โœ… .navbar-light / .navbar-dark โ†’ changes link color scheme.
โœ… bg-* classes โ†’ instantly apply background colors.
๐Ÿง  Combine search forms, icons, and branding for a professional header.

Module 11 โ€“ Bootstrap Utilities & Helpers

Bootstrapโ€™s Utility Classes are pre-made CSS helpers that let you style elements instantly. No need to write new CSS โ€” just add the class you need! For example, p-3 adds padding, text-center centers text, and shadow adds soft shadows. Think of them as โ€œready-to-use shortcutsโ€ to make your design faster and consistent โšก

11.1 ๐Ÿ“ Spacing Utilities (Margin & Padding)

Bootstrap spacing utilities use the syntax: {property}{sides}-{size} where:

  • Property: m = margin, p = padding
  • Sides: t = top, b = bottom, s = start, e = end, x = left/right, y = top/bottom
  • Size: 0โ€“5 (each step โ‰ˆ 0.25rem)
<div class="m-3 p-3 bg-light border">Margin 3, Padding 3</div>
<div class="mt-5 mb-2 bg-warning text-dark">Top Margin 5, Bottom 2</div>
<div class="px-4 py-2 bg-info text-white">Padding X 4, Y 2</div>
๐Ÿ’ก Tip: Use mx-auto to center blocks horizontally (like images or cards).

11.2 ๐ŸŽจ Text & Color Utilities

Easily change text alignment, color, and decoration with simple utility classes.

<p class="text-start text-primary">Left aligned, Blue Text</p>
<p class="text-center text-success">Centered, Green Text</p>
<p class="text-end text-danger fw-bold">Right aligned, Bold Red Text</p>
<p class="text-muted fst-italic">Muted & Italic text</p>
<a href="#" class="text-decoration-none text-warning">No underline yellow link</a>
โšก Quick Guide: fw-bold = bold | fst-italic = italic | text-uppercase = CAPITAL TEXT

11.3 ๐Ÿงฑ Border & Shadow Utilities

Add borders, rounding, and shadows to elements using Bootstrap utilities.

<div class="border border-2 border-primary p-3 mb-3">Blue Border</div>
<div class="border-start border-danger border-4 p-3 mb-3">Left Border Only</div>
<div class="rounded shadow p-4 mb-3 bg-light">Rounded Corners + Shadow</div>
<div class="rounded-pill bg-success text-white p-2">Pill Shape Box</div>
๐ŸŒŸ Pro Tip: Combine .rounded + .shadow-lg for a beautiful card-like appearance.

11.4 ๐Ÿ“ Width, Height & Display Utilities

Control element sizes and display types easily with Bootstrap helpers.

<div class="bg-primary text-white w-50 p-3">Width 50%</div>
<div class="bg-secondary text-white h-25 p-3">Height 25%</div>

<div class="d-inline-block bg-warning p-2">Inline Block</div>
<div class="d-block bg-info p-2 mt-2">Block Element</div>
<div class="d-none d-md-block bg-dark text-white p-2 mt-2">Hidden on mobile</div>
๐Ÿ’ก Responsive Trick: Use d-none d-lg-block to hide elements on mobile and show on large screens only.

11.5 ๐Ÿคธ Flexbox & Alignment Utilities

Bootstrap uses Flexbox for layout alignment and positioning. You can align, justify, and center elements quickly using these classes.

<div class="d-flex justify-content-between align-items-center bg-light p-3">
  <div class="p-2 bg-primary text-white">Left</div>
  <div class="p-2 bg-success text-white">Center</div>
  <div class="p-2 bg-danger text-white">Right</div>
</div>
Class Effect
justify-content-startAlign items to the left
justify-content-centerCenter items horizontally
justify-content-endAlign items to the right
align-items-centerVertically center items
flex-columnStack elements vertically
๐Ÿง  Pro Tip: Combine d-flex + justify-content-center + align-items-center to perfectly center any element!
๐Ÿš€ Recap:
โœ… m-*, p-* โ†’ control margin & padding
โœ… text-*, bg-* โ†’ change color & alignment
โœ… border, shadow, rounded โ†’ design helpers
โœ… w-*, h-*, d-* โ†’ control size & visibility
โœ… d-flex + alignment classes โ†’ layout perfection โœจ These utilities let you design fast โ€” *no CSS file needed!*

Module 12 โ€“ Modal, Offcanvas & Toasts

Bootstrap includes three super-handy UI components for interactivity: ๐ŸชŸ Modals (pop-up dialogs), ๐Ÿ“ฑ Offcanvas (slide-in sidebars), and ๐Ÿ”” Toasts (temporary alert notifications). These are all powered by Bootstrapโ€™s JavaScript and are mobile-responsive by default. Letโ€™s dive in step by step! ๐Ÿš€

12.1 ๐ŸชŸ Bootstrap Modal โ€“ Popup Dialogs

A Modal is a centered popup that appears on top of the page. Itโ€™s great for login forms, confirmations, or displaying details without leaving the current page.

๐Ÿงฉ Basic Modal Structure

<!-- Button to Open Modal -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
  Launch Demo Modal
</button>

<!-- Modal Structure -->
<div class="modal fade" id="exampleModal" tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">NotesTime Modal</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
      </div>
      <div class="modal-body">
        Welcome to your first Bootstrap modal! ๐ŸŽ‰  
        You can use it to show alerts, forms, or messages.
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
๐Ÿ’ก Tip: Use fade for animation and data-bs-dismiss="modal" to close it smoothly.

๐ŸŽจ Modal Sizes

<div class="modal-dialog modal-sm">...</div>  
<div class="modal-dialog modal-lg">...</div>  
<div class="modal-dialog modal-xl">...</div>  

12.2 ๐Ÿ“ฑ Offcanvas โ€“ Slide-in Sidebar

The Offcanvas component is a hidden sidebar that slides in from the left or right. Itโ€™s perfect for mobile menus, side panels, or shopping carts.

๐Ÿงฉ Example: Left Side Menu

<!-- Button to open Offcanvas -->
<button class="btn btn-dark" type="button" data-bs-toggle="offcanvas" data-bs-target="#sideMenu">
  Open Sidebar
</button>

<!-- Offcanvas Structure -->
<div class="offcanvas offcanvas-start" tabindex="-1" id="sideMenu">
  <div class="offcanvas-header">
    <h5 class="offcanvas-title">Menu</h5>
    <button type="button" class="btn-close" data-bs-dismiss="offcanvas"></button>
  </div>
  <div class="offcanvas-body">
    <ul class="list-unstyled">
      <li><a href="#" class="text-decoration-none">Home</a></li>
      <li><a href="#" class="text-decoration-none">Courses</a></li>
      <li><a href="#" class="text-decoration-none">Blog</a></li>
      <li><a href="#" class="text-decoration-none">Contact</a></li>
    </ul>
  </div>
</div>
โšก Note: Change offcanvas-start โ†’ offcanvas-end for right side, offcanvas-top or offcanvas-bottom for vertical ones.

๐Ÿ’ก Offcanvas with Background

<div class="offcanvas offcanvas-end text-bg-dark" tabindex="-1" id="darkMenu">
  <div class="offcanvas-header">
    <h5 class="offcanvas-title">Dark Sidebar</h5>
    <button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas"></button>
  </div>
  <div class="offcanvas-body">
    Dark themed offcanvas using text-bg-dark.
  </div>
</div>

12.3 ๐Ÿ”” Toasts โ€“ Notifications

Toasts are lightweight pop-up alerts that appear temporarily at the edge of the screen. Theyโ€™re often used for feedback messages (like โ€œSaved successfullyโ€ โœ…).

๐Ÿงฉ Example: Simple Toast

<!-- Button to Show Toast -->
<button type="button" class="btn btn-success" id="showToast">Show Toast</button>

<!-- Toast Element -->
<div class="toast align-items-center text-bg-success border-0 position-fixed bottom-0 end-0 m-3" role="alert" id="liveToast">
  <div class="d-flex">
    <div class="toast-body">
      โœ… Successfully saved your progress!
    </div>
    <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"></button>
  </div>
</div>

<script>
  const toastTrigger = document.getElementById('showToast');
  const toastLive = document.getElementById('liveToast');
  const toast = new bootstrap.Toast(toastLive);
  toastTrigger.addEventListener('click', () => toast.show());
</script>
๐ŸŒŸ Pro Tip: You can use position-fixed and m-* classes to control toast placement anywhere.

โœจ Multiple Toasts Example

<div class="toast-container position-fixed top-0 end-0 p-3">
  <div class="toast text-bg-info"><div class="toast-body">Welcome Back! ๐Ÿ‘‹</div></div>
  <div class="toast text-bg-danger"><div class="toast-body">Error Saving Data โŒ</div></div>
</div>
๐Ÿš€ Recap:
โœ… Modals โ€“ pop-up windows for forms and messages
โœ… Offcanvas โ€“ slide-in sidebars for menus and navigation
โœ… Toasts โ€“ quick feedback notifications
๐Ÿง  Combine these with buttons, forms, and icons to create professional, dynamic UI interactions!

Module 13 โ€“ Carousel & Slideshows

A Carousel in Bootstrap is a rotating slideshow for images or text. It allows you to display multiple items โ€” like banners, testimonials, or featured products โ€” with smooth transitions. You can control how it slides, how fast it rotates, and even add captions. Letโ€™s learn how to make it visually stunning and functional ๐Ÿš€

13.1 ๐Ÿ—๏ธ Basic Carousel Structure

The carousel uses .carousel and .carousel-inner to hold slides. Each slide is inside a .carousel-item.

<div id="notesCarousel" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="slide1.jpg" class="d-block w-100" alt="Slide 1">
    </div>
    <div class="carousel-item">
      <img src="slide2.jpg" class="d-block w-100" alt="Slide 2">
    </div>
    <div class="carousel-item">
      <img src="slide3.jpg" class="d-block w-100" alt="Slide 3">
    </div>
  </div>
</div>
๐Ÿ’ก Tip: Always mark the first slide as .active so the carousel knows where to start.

13.2 ๐ŸŽฎ Adding Controls (Next & Previous)

To let users manually move between slides, add navigation controls using buttons or icons.

<div id="notesCarousel" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="img1.jpg" class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="img2.jpg" class="d-block w-100" alt="...">
    </div>
  </div>

  <!-- Controls -->
  <button class="carousel-control-prev" type="button" data-bs-target="#notesCarousel" data-bs-slide="prev">
    <span class="carousel-control-prev-icon"></span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#notesCarousel" data-bs-slide="next">
    <span class="carousel-control-next-icon"></span>
  </button>
</div>
โœ… Pro Tip: You can replace icons with text using <span>Previous</span> and <span>Next</span> if you prefer.

13.3 ๐Ÿ”˜ Adding Indicators (Slide Dots)

Indicators show users which slide is currently active. Each dot links to a specific slide using data-bs-slide-to.

<div id="bannerCarousel" class="carousel slide" data-bs-ride="carousel">
  <!-- Indicators -->
  <div class="carousel-indicators">
    <button type="button" data-bs-target="#bannerCarousel" data-bs-slide-to="0" class="active"></button>
    <button type="button" data-bs-target="#bannerCarousel" data-bs-slide-to="1"></button>
    <button type="button" data-bs-target="#bannerCarousel" data-bs-slide-to="2"></button>
  </div>

  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="slide1.jpg" class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="slide2.jpg" class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="slide3.jpg" class="d-block w-100" alt="...">
    </div>
  </div>
</div>
โšก Note: Each indicatorโ€™s index starts from 0 (like arrays in programming).

13.4 ๐Ÿ•’ Autoplay & Interval Settings

You can make your carousel automatically switch slides every few seconds using the data-bs-ride and data-bs-interval attributes.

<div id="autoCarousel" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active" data-bs-interval="2000">
      <img src="banner1.jpg" class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item" data-bs-interval="3000">
      <img src="banner2.jpg" class="d-block w-100" alt="...">
    </div>
  </div>
</div>
๐Ÿ’ก Tip: Default interval = 5000ms (5 seconds). Set data-bs-interval="false" to stop auto-sliding.

13.5 ๐Ÿ–‹๏ธ Adding Captions & Text Overlays

Add text or buttons inside a slide with .carousel-caption. Itโ€™s perfect for headlines or โ€œCall To Actionโ€ sections.

<div id="captionCarousel" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="hero.jpg" class="d-block w-100" alt="Hero">
      <div class="carousel-caption d-none d-md-block">
        <h5>Welcome to NotesTime</h5>
        <p>Learn Bootstrap with beautiful examples.</p>
        <a href="#" class="btn btn-light btn-sm">Start Learning</a>
      </div>
    </div>
  </div>
</div>
๐ŸŒŸ Pro Tip: Use .d-none d-md-block on captions to hide them on mobile for better visibility.
๐Ÿš€ Recap:
โœ… .carousel โ†’ Creates the slider
โœ… .carousel-inner โ†’ Contains slides
โœ… .carousel-control-prev/next โ†’ Adds arrows
โœ… .carousel-indicators โ†’ Adds navigation dots
โœ… .carousel-caption โ†’ Adds overlay text
๐Ÿง  Combine autoplay + captions + controls for professional results!

Module 14 โ€“ Alerts, Badges & Progress Bars

In this module, weโ€™ll explore three commonly used Bootstrap UI elements:

  • ๐Ÿšจ Alerts โ€“ display notifications or messages
  • ๐Ÿท๏ธ Badges โ€“ show counts or highlights
  • ๐Ÿ“Š Progress Bars โ€“ visualize progress or status
These tools improve user interaction and make your design more informative and dynamic.

14.1 ๐Ÿšจ Bootstrap Alerts

Alerts are used to show important feedback like success, warnings, or errors. You can dismiss them easily or make them stay visible permanently.

๐ŸŽฏ Basic Alert Examples

<div class="alert alert-primary" role="alert">
  This is a primary alert โ€” check it out!
</div>

<div class="alert alert-success" role="alert">
  โœ… Operation successful!
</div>

<div class="alert alert-danger" role="alert">
  โŒ Something went wrong!
</div>

<div class="alert alert-warning" role="alert">
  โš ๏ธ Be careful with this action.
</div>
๐Ÿ’ก Tip: Use alert-* with any Bootstrap color class โ€” like primary, success, danger, warning, info, dark.

โŒ Dismissible Alert

<div class="alert alert-success alert-dismissible fade show" role="alert">
  Your profile has been updated successfully ๐ŸŽ‰
  <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
โœ… Pro Tip: Add alert-dismissible fade show to make the alert closable with a smooth fade effect.

14.2 ๐Ÿท๏ธ Bootstrap Badges

Badges are tiny count or status indicators โ€” perfect for showing notifications, unread messages, or statuses next to items.

๐ŸŽฏ Basic Badge Usage

<h1>Messages <span class="badge bg-primary">5</span></h1>
<h2>Notifications <span class="badge bg-danger">3</span></h2>
<p>New Comment <span class="badge bg-success">New</span></p>

๐Ÿ“ฆ Badges on Buttons

<button type="button" class="btn btn-dark position-relative">
  Inbox
  <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
    99+
    <span class="visually-hidden">unread messages</span>
  </span>
</button>
โšก Note: Combine position-relative and position-absolute to place badges perfectly.

๐ŸŽจ Badge Colors

<span class="badge bg-primary">Primary</span>
<span class="badge bg-secondary">Secondary</span>
<span class="badge bg-success">Success</span>
<span class="badge bg-danger">Danger</span>
<span class="badge bg-warning text-dark">Warning</span>
<span class="badge bg-info text-dark">Info</span>
<span class="badge bg-dark">Dark</span>

14.3 ๐Ÿ“Š Bootstrap Progress Bars

Progress bars visually show completion or loading status. You can control their width and color using Bootstrapโ€™s utility classes.

๐Ÿงฉ Basic Example

<div class="progress">
  <div class="progress-bar" style="width: 60%;">60% Complete</div>
</div>

๐ŸŽจ Progress Bar Colors

<div class="progress mt-3">
  <div class="progress-bar bg-success" style="width: 80%;">Success</div>
</div>

<div class="progress mt-2">
  <div class="progress-bar bg-danger" style="width: 40%;">Error</div>
</div>

<div class="progress mt-2">
  <div class="progress-bar bg-warning text-dark" style="width: 70%;">Warning</div>
</div>
๐Ÿ’ก Tip: Use progress-bar-striped or progress-bar-animated for extra flair.

๐Ÿ”ฅ Animated Example

<div class="progress mt-3">
  <div class="progress-bar progress-bar-striped progress-bar-animated bg-info" style="width: 75%;">
    Uploading...
  </div>
</div>
๐Ÿš€ Recap:
โœ… Alerts โ€“ show messages or feedback to users
โœ… Badges โ€“ display counts, labels, and highlights
โœ… Progress Bars โ€“ visualize progress dynamically
๐Ÿง  Combine these for dashboards, status pages, and notifications

Module 15 โ€“ Cards & Card Layouts

The Bootstrap Card component is a simple yet powerful container for displaying content with a clean and organized design. Cards can hold images, titles, text, buttons, and even lists or embedded media. Letโ€™s see how to make them attractive and useful in different layouts ๐Ÿงฉ

15.1 ๐Ÿƒ Basic Card Structure

A card consists of the .card container with sections like .card-body, .card-title, .card-text, and optional .card-img-top for images.

<div class="card" style="width: 18rem;">
  <img src="card-image.jpg" class="card-img-top" alt="Card Image">
  <div class="card-body">
    <h5 class="card-title">Learn Bootstrap</h5>
    <p class="card-text">Bootstrap makes front-end development faster and easier!</p>
    <a href="#" class="btn btn-primary">Start Now</a>
  </div>
</div>
๐Ÿ’ก Tip: You can change the cardโ€™s width using style="width:..." or responsive grid classes like col-md-4.

15.2 ๐Ÿ–ผ๏ธ Image Placement in Cards

Cards support images on the top, bottom, or as full background covers. Hereโ€™s how to use each:

<!-- Image on Top -->
<div class="card">
  <img src="image-top.jpg" class="card-img-top" alt="...">
  <div class="card-body">Text inside</div>
</div>

<!-- Image on Bottom -->
<div class="card">
  <div class="card-body">Some content</div>
  <img src="image-bottom.jpg" class="card-img-bottom" alt="...">
</div>

<!-- Image as Background -->
<div class="card text-bg-dark">
  <img src="bg-image.jpg" class="card-img" alt="...">
  <div class="card-img-overlay">
    <h5 class="card-title">Overlay Card</h5>
    <p class="card-text">Text appears over image</p>
  </div>
</div>
โšก Note: Use .card-img-overlay to display text or buttons on top of the image background.

15.3 ๐Ÿ“š Card Groups, Decks & Grids

You can arrange multiple cards in a row using card groups or responsive grids. This is perfect for blog posts, services, or team sections.

<!-- Card Group (Equal Height Cards) -->
<div class="card-group">
  <div class="card">
    <img src="card1.jpg" class="card-img-top">
    <div class="card-body"><h5>Card One</h5><p>Short info</p></div>
  </div>
  <div class="card">
    <img src="card2.jpg" class="card-img-top">
    <div class="card-body"><h5>Card Two</h5><p>More info</p></div>
  </div>
</div>

<!-- Responsive Grid Layout -->
<div class="row row-cols-1 row-cols-md-3 g-4">
  <div class="col">
    <div class="card h-100">
      <img src="blog1.jpg" class="card-img-top">
      <div class="card-body">
        <h5>Responsive Card</h5>
        <p>Fits all screen sizes</p>
      </div>
    </div>
  </div>
</div>
๐ŸŒŸ Pro Tip: Use row-cols-md-3 to automatically make 3 cards per row on medium screens and above โ€” perfect for responsive designs!

15.4 ๐Ÿงฉ Advanced Cards (Headers, Footers & Lists)

You can add headers, footers, or even lists inside cards for structured content โ€” such as pricing or contact cards.

<div class="card text-center">
  <div class="card-header">
    Featured
  </div>
  <div class="card-body">
    <h5 class="card-title">Special Offer</h5>
    <p class="card-text">Get Bootstrap training at 50% off.</p>
    <a href="#" class="btn btn-primary">Enroll Now</a>
  </div>
  <div class="card-footer text-muted">
    Offer ends soon โฐ
  </div>
</div>

<!-- List Group Inside Card -->
<div class="card" style="width: 18rem;">
  <ul class="list-group list-group-flush">
    <li class="list-group-item">HTML Basics</li>
    <li class="list-group-item">CSS Styling</li>
    <li class="list-group-item">Bootstrap Layouts</li>
  </ul>
</div>
๐Ÿ’ก Idea: Combine cards + lists to make pricing plans, FAQs, or course details beautifully.
๐Ÿš€ Recap:
โœ… Cards โ€“ clean content containers for text & media
โœ… Card Groups & Grids โ€“ arrange cards responsively
โœ… Image & Overlay Cards โ€“ visual storytelling
โœ… Headers, Footers, Lists โ€“ structured information
๐Ÿง  Use cards everywhere: blogs, eCommerce, dashboards, or portfolios!

Module 16 โ€“ Navbar & Navigation

A Navbar is the main navigation header of a website. Bootstrap makes it super easy to build **responsive, sticky, and stylish navbars** using classes like .navbar, .navbar-expand, and .navbar-brand. You can add logos, links, dropdowns, search bars, and even buttons! ๐Ÿงฉ

16.1 ๐Ÿงฑ Basic Navbar Structure

Hereโ€™s the simplest responsive navbar โ€” it collapses on smaller screens and expands on large ones.

<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">NotesTime</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarBasic">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarBasic">
      <ul class="navbar-nav me-auto mb-2 mb-lg-0">
        <li class="nav-item"><a class="nav-link active" href="#">Home</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Courses</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Blog</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Contact</a></li>
      </ul>
      <button class="btn btn-outline-success">Login</button>
    </div>
  </div>
</nav>
๐Ÿ’ก Tip: Use navbar-expand-lg for responsiveness, navbar-light or navbar-dark for theme color, and bg-* classes for background.

16.2 ๐ŸŽจ Navbar Colors & Backgrounds

Bootstrap navbars can use any color background โ€” from light to dark, even gradients or custom CSS.

<nav class="navbar navbar-dark bg-dark">...</nav>
<nav class="navbar navbar-light bg-warning">...</nav>
<nav class="navbar navbar-expand-md bg-primary navbar-dark">...</nav>
โšก Note: Always use navbar-dark on dark backgrounds and navbar-light on light backgrounds for text visibility.

16.3 ๐Ÿ“ฑ Responsive Navbar Collapse

The navbar automatically becomes a โ€œhamburger menuโ€ on small devices. You can control when it collapses using navbar-expand-*.

<!-- Collapse at medium breakpoint -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">MySite</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarCollapse">
      <ul class="navbar-nav me-auto mb-2 mb-md-0">
        <li class="nav-item"><a class="nav-link" href="#">Home</a></li>
        <li class="nav-item"><a class="nav-link" href="#">About</a></li>
      </ul>
    </div>
  </div>
</nav>
๐ŸŒŸ Pro Tip: Use navbar-expand-md or navbar-expand-lg for smoother transitions across screen sizes.

16.4 ๐Ÿ”ฝ Navbar with Dropdowns

You can easily add dropdown menus inside navbars using Bootstrapโ€™s dropdown component.

<li class="nav-item dropdown">
  <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
    Tutorials
  </a>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">HTML</a></li>
    <li><a class="dropdown-item" href="#">CSS</a></li>
    <li><a class="dropdown-item" href="#">Bootstrap</a></li>
  </ul>
</li>
๐Ÿ’ก Tip: You can place dropdowns in both left or right sections. Add .dropdown-menu-end to align it to the right.

16.5 ๐Ÿ” Navbar with Search Bar & Buttons

Add forms and buttons to your navbar for searching or actions.

<form class="d-flex">
  <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
  <button class="btn btn-outline-success" type="submit">Search</button>
</form>
๐Ÿ”Ž Example: Combine a search bar with your brand logo and nav links for a full-featured header.

16.6 ๐Ÿ“Œ Sticky & Fixed Navbar

Bootstrap allows you to keep the navbar always visible โ€” fixed to the top or bottom.

<nav class="navbar navbar-dark bg-dark fixed-top">...</nav>
<nav class="navbar navbar-light bg-light fixed-bottom">...</nav>
<nav class="navbar sticky-top bg-primary navbar-dark">...</nav>
โš ๏ธ Remember: When using fixed-top, add padding to your pageโ€™s top so content doesnโ€™t hide behind the navbar.
๐Ÿš€ Recap:
โœ… Navbar โ€“ build responsive site headers
โœ… Dropdowns โ€“ add multiple menu levels
โœ… Search Bars & Buttons โ€“ improve UX
โœ… Sticky / Fixed Navbars โ€“ enhance accessibility
๐Ÿง  Combine with branding and icons for professional results!

Module 17 โ€“ Dropdowns & Nav Tabs

Dropdowns and tabs let users easily navigate different sections or content views without leaving the page. Bootstrapโ€™s built-in components make these **dynamic menus** simple and stylish โ€” no custom JS needed! ๐Ÿ’ช

17.1 ๐Ÿ”ฝ Dropdown Basics

A dropdown menu displays additional options when a button or link is clicked. Hereโ€™s a simple example:

<div class="dropdown">
  <button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown">
    Choose Topic
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">HTML</a></li>
    <li><a class="dropdown-item" href="#">CSS</a></li>
    <li><a class="dropdown-item" href="#">Bootstrap</a></li>
  </ul>
</div>
๐Ÿ’ก Tip: Add data-bs-toggle="dropdown" to make it functional. Bootstrap automatically handles the open/close behavior.

17.2 โš™๏ธ Split Button Dropdowns

Split dropdowns give users both a **main action** and a **menu trigger**.

<div class="btn-group">
  <button type="button" class="btn btn-success">Save</button>
  <button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Save as Draft</a></li>
    <li><a class="dropdown-item" href="#">Save & Publish</a></li>
  </ul>
</div>
โœ… Best for: โ€œSaveโ€ buttons, actions with multiple options, or download menus.

17.3 ๐Ÿงญ Navigation Tabs

Tabs are perfect for switching between content sections โ€” like product details, reviews, or settings โ€” without reloading the page.

<ul class="nav nav-tabs" id="myTab" role="tablist">
  <li class="nav-item" role="presentation">
    <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button">Home</button>
  </li>
  <li class="nav-item" role="presentation">
    <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button">Profile</button>
  </li>
  <li class="nav-item" role="presentation">
    <button class="nav-link" id="contact-tab" data-bs-toggle="tab" data-bs-target="#contact" type="button">Contact</button>
  </li>
</ul>

<div class="tab-content mt-3">
  <div class="tab-pane fade show active" id="home">๐Ÿ  Home content here.</div>
  <div class="tab-pane fade" id="profile">๐Ÿ‘ค Profile details here.</div>
  <div class="tab-pane fade" id="contact">๐Ÿ“ž Contact info here.</div>
</div>
โšก Note: Use data-bs-toggle="tab" for automatic switching between content panels.

17.4 ๐Ÿ’Š Navigation Pills

Pills are a rounded and modern alternative to tabs. You can also make them vertical or justified across the screen.

<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
  <li class="nav-item">
    <button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home">Home</button>
  </li>
  <li class="nav-item">
    <button class="nav-link" id="pills-profile-tab" data-bs-toggle="pill" data-bs-target="#pills-profile">Profile</button>
  </li>
  <li class="nav-item">
    <button class="nav-link" id="pills-contact-tab" data-bs-toggle="pill" data-bs-target="#pills-contact">Contact</button>
  </li>
</ul>

<div class="tab-content mt-3">
  <div class="tab-pane fade show active" id="pills-home">๐Ÿ  Home Tab</div>
  <div class="tab-pane fade" id="pills-profile">๐Ÿ‘ค Profile Tab</div>
  <div class="tab-pane fade" id="pills-contact">๐Ÿ“ž Contact Tab</div>
</div>
๐Ÿ’ก Tip: Use nav-fill or nav-justified to make tabs stretch evenly across the width.

17.5 ๐Ÿงฑ Vertical Navs (Side Tabs)

You can display navigation tabs vertically โ€” great for dashboards or sidebar menus.

<div class="d-flex align-items-start">
  <div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist">
    <button class="nav-link active" data-bs-toggle="pill" data-bs-target="#v-home">Home</button>
    <button class="nav-link" data-bs-toggle="pill" data-bs-target="#v-profile">Profile</button>
    <button class="nav-link" data-bs-toggle="pill" data-bs-target="#v-settings">Settings</button>
  </div>

  <div class="tab-content" id="v-pills-tabContent">
    <div class="tab-pane fade show active" id="v-home">๐Ÿ  Vertical Home</div>
    <div class="tab-pane fade" id="v-profile">๐Ÿ‘ค Vertical Profile</div>
    <div class="tab-pane fade" id="v-settings">โš™๏ธ Vertical Settings</div>
  </div>
</div>
๐ŸŒŸ Use case: Perfect for admin dashboards, course sidebars, or profile settings pages.
๐Ÿš€ Recap:
โœ… Dropdowns โ€“ reveal hidden menu options
โœ… Split Buttons โ€“ quick actions + choices
โœ… Tabs & Pills โ€“ organize content cleanly
โœ… Vertical Navs โ€“ great for side layouts
๐Ÿง  Bootstrap JS automatically powers the interactivity!

Module 18 โ€“ Modal, Offcanvas & Toasts

Bootstrap includes JavaScript-powered UI components that make your website **interactive and dynamic**. You can create pop-ups, side panels, and live notifications without writing any JavaScript manually โ€” only HTML attributes! ๐Ÿš€

18.1 ๐ŸชŸ Bootstrap Modal

A Modal is a centered pop-up dialog box that appears over your page content. Itโ€™s used for sign-in forms, confirmations, or displaying additional information.

<!-- Button trigger -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
  Open Modal
</button>

<!-- Modal Structure -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Welcome to NotesTime!</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        Learn Bootstrap easily with step-by-step examples ๐Ÿš€
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Start Learning</button>
      </div>
    </div>
  </div>
</div>
๐Ÿ’ก Tip: Use data-bs-toggle="modal" and data-bs-target="#id" to connect a button with the modal you want to open.

๐Ÿ“ Modal Sizes

<div class="modal-dialog modal-sm">Small</div>
<div class="modal-dialog modal-lg">Large</div>
<div class="modal-dialog modal-xl">Extra Large</div>

18.2 ๐Ÿ“ฑ Offcanvas Component

The Offcanvas is a sliding panel (usually from left or right). Itโ€™s perfect for side menus, mobile navigation, or filters โ€” similar to a drawer or sidebar.

<!-- Button to open Offcanvas -->
<button class="btn btn-dark" type="button" data-bs-toggle="offcanvas" data-bs-target="#sideMenu">
  โ˜ฐ Open Sidebar
</button>

<!-- Offcanvas Structure -->
<div class="offcanvas offcanvas-start" tabindex="-1" id="sideMenu">
  <div class="offcanvas-header">
    <h5 class="offcanvas-title">Main Menu</h5>
    <button type="button" class="btn-close" data-bs-dismiss="offcanvas"></button>
  </div>
  <div class="offcanvas-body">
    <ul class="list-group">
      <li class="list-group-item">Home</li>
      <li class="list-group-item">Courses</li>
      <li class="list-group-item">Blog</li>
      <li class="list-group-item">Contact</li>
    </ul>
  </div>
</div>
๐ŸŒŸ Customization: - Use offcanvas-end for right-side panel - Use offcanvas-top or offcanvas-bottom for top/bottom drawers

18.3 ๐Ÿ”” Bootstrap Toasts (Notifications)

Toasts are small, temporary pop-up notifications used for alerts like โ€œMessage Sentโ€ or โ€œSaved Successfullyโ€. They appear at the edge of the screen and disappear automatically or when closed.

<!-- Button Trigger -->
<button class="btn btn-success" id="showToastBtn">Show Toast</button>

<!-- Toast Container -->
<div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11">
  <div id="liveToast" class="toast align-items-center text-bg-primary border-0" role="alert">
    <div class="d-flex">
      <div class="toast-body">
        โœ… Your file was uploaded successfully!
      </div>
      <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"></button>
    </div>
  </div>
</div>

<!-- Script to trigger Toast -->
<script>
  const toastTrigger = document.getElementById('showToastBtn')
  const toastLive = document.getElementById('liveToast')
  if (toastTrigger) {
    toastTrigger.addEventListener('click', () => {
      const toast = new bootstrap.Toast(toastLive)
      toast.show()
    })
  }
</script>
โšก Note: Toasts need a bit of JavaScript to show dynamically. You can place them anywhere on the screen using utility classes (like top-0 start-0).
๐Ÿš€ Recap:
โœ… Modals โ€“ pop-up boxes for forms and alerts
โœ… Offcanvas โ€“ hidden side menus or drawers
โœ… Toasts โ€“ instant notifications for user feedback
๐Ÿง  Bootstrap handles all functionality with simple data-bs-* attributes!

Module 19 โ€“ Carousel & Slideshow Components

The Bootstrap Carousel is a powerful and lightweight slider component for cycling through images, text, or custom content. You can control it with indicators, previous/next buttons, or even keyboard arrows โ€” all built-in! โš™๏ธ

19.1 ๐Ÿ–ผ๏ธ Basic Carousel Structure

Letโ€™s start with the simplest form โ€” a carousel that slides between images automatically.

<div id="basicCarousel" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="slide1.jpg" class="d-block w-100" alt="Slide 1">
    </div>
    <div class="carousel-item">
      <img src="slide2.jpg" class="d-block w-100" alt="Slide 2">
    </div>
    <div class="carousel-item">
      <img src="slide3.jpg" class="d-block w-100" alt="Slide 3">
    </div>
  </div>
</div>
๐Ÿ’ก Tip: Use data-bs-ride="carousel" to make it auto-slide continuously.

19.2 ๐ŸŽš๏ธ Adding Controls & Indicators

You can add **indicators** (the small dots) and **next/previous arrows** for user control.

<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-indicators">
    <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active"></button>
    <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1"></button>
    <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2"></button>
  </div>

  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="banner1.jpg" class="d-block w-100" alt="Banner 1">
    </div>
    <div class="carousel-item">
      <img src="banner2.jpg" class="d-block w-100" alt="Banner 2">
    </div>
    <div class="carousel-item">
      <img src="banner3.jpg" class="d-block w-100" alt="Banner 3">
    </div>
  </div>

  <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
  </button>
</div>
โœ… Best Practice: Always add controls and indicators for better user accessibility.

19.3 ๐Ÿ“ Adding Captions & Text Overlays

You can display text or call-to-action buttons on your slides using .carousel-caption.

<div class="carousel-item active">
  <img src="hero1.jpg" class="d-block w-100" alt="Hero Image">
  <div class="carousel-caption d-none d-md-block">
    <h5>Welcome to Bootstrap Learning</h5>
    <p>Master web design with clean and responsive layouts.</p>
    <a href="#" class="btn btn-primary">Get Started</a>
  </div>
</div>
โšก Note: Hide captions on small screens using d-none d-md-block for a cleaner view.

19.4 ๐Ÿ•น๏ธ Controlling Auto-Interval & Animation

You can control slide duration or turn off auto-sliding altogether.

<!-- Custom interval per slide -->
<div class="carousel-item" data-bs-interval="3000">...</div>

<!-- Turn off auto sliding -->
<div id="manualCarousel" class="carousel slide" data-bs-ride="false">...</div>
โฑ๏ธ Example: 3000ms = 3 seconds per slide. You can even control with data-bs-pause="hover" to stop sliding when hovered.

19.5 ๐Ÿงฉ Custom Carousel Content (Cards, Videos, etc.)

Youโ€™re not limited to images โ€” add any HTML inside carousel items like cards, testimonials, or embedded videos.

<div class="carousel-item">
  <div class="d-flex justify-content-center">
    <div class="card text-center" style="width: 20rem;">
      <div class="card-body">
        <h5 class="card-title">Student Testimonial</h5>
        <p class="card-text">โ€œBootstrap made responsive design so easy!โ€</p>
        <p>- Priya Sharma</p>
      </div>
    </div>
  </div>
</div>
๐Ÿ’ก Creative Use: Carousels are great for testimonials, client logos, or feature highlights โ€” not just banners!
๐Ÿš€ Recap:
โœ… Carousel โ€“ automatic or manual slide transitions
โœ… Indicators & Controls โ€“ improve navigation
โœ… Captions โ€“ add text and CTAs on images
โœ… Custom Content โ€“ cards, text, or video
๐Ÿง  Bootstrapโ€™s JS powers everything without custom code!

Module 20 โ€“ Utilities & Helper Classes

Bootstrap Utilities are small, ready-to-use CSS classes that let you adjust spacing, color, alignment, and layout behavior **instantly** โ€” without writing any custom CSS. ๐ŸŽฏ Think of them as the โ€œquick-access toolsโ€ in your web design toolbox.

20.1 ๐Ÿ“ Spacing Utilities (Margin & Padding)

The spacing system helps you control **margin (m)** and **padding (p)**. You can apply it on all sides or individually โ€” top, bottom, start, and end.

<!-- Margin (m) and Padding (p) syntax -->
m = margin
p = padding

t = top, b = bottom, s = start (left), e = end (right), x = left/right, y = top/bottom

<div class="mt-3 mb-4 px-5">Margin top 3, bottom 4, padding x 5</div>
SizeValue
00 (no space)
10.25rem
20.5rem
31rem
41.5rem
53rem
๐Ÿ’ก Tip: Use m-auto to center an element horizontally using auto margins.

20.2 ๐Ÿ“ Sizing Utilities (Width, Height, Max & Min)

Control the dimensions of any element with width and height utilities โ€” especially useful for images, modals, and cards.

<div class="w-25">25% width</div>
<div class="w-50">50% width</div>
<div class="w-75">75% width</div>
<div class="w-100">Full width</div>

<img src="image.jpg" class="w-50 h-auto" alt="Responsive Image">
๐ŸŒŸ Quick Tip: Use .mw-100 and .mh-100 for max-width and max-height limits.

20.3 ๐Ÿงฑ Display & Visibility Utilities

Quickly control how elements are displayed using d-* classes.

<div class="d-block">Block element</div>
<span class="d-inline">Inline element</span>
<div class="d-flex">Flex container</div>

<div class="d-none d-md-block">Hidden on mobile, visible on desktop</div>
ClassBehavior
d-noneHide element
d-blockDisplay block
d-inlineInline display
d-flexUse Flexbox layout
โšก Use Case: d-none d-lg-block hides an element on mobile but shows it on large screens.

20.4 ๐ŸŽฏ Position Utilities

Control where elements appear using position helpers like position-relative, absolute, or sticky.

<div class="position-relative">
  <div class="position-absolute top-0 end-0 bg-primary text-white p-2">
    Top Right Corner
  </div>
</div>
๐Ÿง  Tip: Combine top-0, bottom-0, start-0, end-0 for custom positioning.

20.5 ๐ŸŒˆ Color, Background & Border Utilities

Easily add colors, background shades, and borders with Bootstrapโ€™s built-in palette.

<div class="text-primary">Blue text</div>
<div class="bg-success text-white p-3">Green background</div>
<div class="border border-danger p-2">Red border</div>
<div class="rounded-3 shadow-sm p-3">Rounded with shadow</div>
๐ŸŽจ Bootstrap Color Classes: primary, secondary, success, danger, warning, info, light, dark

20.6 ๐Ÿงญ Overflow, Z-Index & Shadow Utilities

Control how content behaves inside containers โ€” like scroll, hide overflow, or layer elements.

<div class="overflow-auto" style="max-height:100px;">
  Long content that scrolls when needed.
</div>

<div class="position-relative z-3">Above others</div>
<div class="shadow-lg p-3 bg-light">Large shadow</div>
๐Ÿ’ก Pro Tip: Use z-1 to z-3 to layer modals, dropdowns, or alerts correctly.
๐Ÿš€ Recap:
โœ… Margin & Padding โ€“ quick spacing control
โœ… Width, Height โ€“ responsive sizing
โœ… Display โ€“ hide/show elements easily
โœ… Position โ€“ absolute, relative, sticky layouts
โœ… Color & Border โ€“ instant styling
โœ… Shadow, Overflow, Z-index โ€“ professional depth & layering
๐Ÿง  Utilities = Fast, CSS-free customization for perfect design control!

Module 21 โ€“ Responsive Helpers & Breakpoints

Bootstrapโ€™s **responsive design system** allows you to create layouts that look perfect on all screen sizes. Itโ€™s built on a set of predefined **breakpoints** (like sm, md, lg, etc.) that automatically adjust spacing, grids, typography, and components. ๐Ÿ“

21.1 ๐Ÿ“ What Are Breakpoints?

A breakpoint is a screen width where the layout changes to fit different devices. For example, a 3-column layout might change to 1-column on mobile. Bootstrap includes 6 default breakpoints:

BreakpointPrefixMin WidthDevice Example
Extra Small(none)<576pxPhones (Portrait)
Smallsmโ‰ฅ576pxPhones (Landscape)
Mediummdโ‰ฅ768pxTablets
Largelgโ‰ฅ992pxLaptops
Extra Largexlโ‰ฅ1200pxDesktops
Extra Extra Largexxlโ‰ฅ1400pxLarge Monitors
๐Ÿ’ก Tip: Combine breakpoints with Bootstrap classes like .col-md-6 or .d-lg-block to apply styles only on certain devices.

21.2 ๐Ÿงฑ Responsive Grid Example

You can easily make your layout adjust automatically using grid breakpoints. For example:

<div class="container">
  <div class="row">
    <div class="col-12 col-md-6 col-lg-4 bg-light p-3">Column 1</div>
    <div class="col-12 col-md-6 col-lg-4 bg-secondary text-white p-3">Column 2</div>
    <div class="col-12 col-lg-4 bg-info text-white p-3">Column 3</div>
  </div>
</div>
๐ŸŒŸ Responsive Behavior: - On Mobile โ†’ 1 column per row - On Tablet โ†’ 2 columns per row - On Desktop โ†’ 3 columns per row

21.3 ๐Ÿ‘๏ธ Responsive Display Utilities

You can control the visibility of elements across different screen sizes using d-*-* classes.

<div class="d-none d-md-block">Visible on Tablet & Desktop</div>
<div class="d-block d-md-none">Visible only on Mobile</div>
ClassBehavior
d-noneAlways hidden
d-sm-blockVisible on small and up
d-lg-noneHidden on large and up
d-xl-blockVisible on extra large only
โšก Example: d-none d-lg-block โ†’ Hide on mobile, show on large screens.

21.4 ๐Ÿ“ Responsive Spacing Utilities

Spacing classes can also change by device! Just add breakpoint prefixes like mt-md-5 or p-lg-3.

<div class="p-2 p-md-4 p-lg-5 bg-light">
  Responsive padding changes by screen size!
</div>
๐ŸŒˆ Example: - Mobile โ†’ Padding 2 - Tablet โ†’ Padding 4 - Desktop โ†’ Padding 5

21.5 ๐ŸŽฏ Responsive Text Alignment & Flex Helpers

Bootstrap lets you align text and flex items differently based on breakpoints.

<div class="text-center text-md-start text-lg-end">
  Responsive Text Alignment
</div>

<div class="d-flex flex-column flex-md-row justify-content-between">
  <div>Item 1</div>
  <div>Item 2</div>
</div>
๐Ÿ’ก Pro Tip: Combine flex and text utilities to create perfect mobile-to-desktop transitions.

21.6 ๐Ÿง  Practical Example โ€“ Responsive Navbar

Hereโ€™s a mini example of a responsive navbar that collapses into a toggle menu on small screens.

<nav class="navbar navbar-expand-md navbar-dark bg-dark">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">NotesTime</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNav">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="mainNav">
      <ul class="navbar-nav ms-auto">
        <li class="nav-item"><a class="nav-link" href="#">Home</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Courses</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Contact</a></li>
      </ul>
    </div>
  </div>
</nav>
๐Ÿš€ Bootstrap Magic: .navbar-expand-md means: - Collapsed on mobile - Expanded from tablets (โ‰ฅ768px) and up
๐Ÿš€ Recap:
โœ… Breakpoints define screen size thresholds
โœ… Grids, spacing, and text can change responsively
โœ… Display utilities hide/show by device
โœ… Flex helpers adjust layout flow dynamically
โœ… Responsive navbar = best real-world use case
๐Ÿง  Mastering this = True Responsive Design Expert!

Module 22 โ€“ Customizing Bootstrap with SCSS

Bootstrap is built with SCSS (Sass) โ€” a CSS preprocessor that allows developers to write modular, maintainable, and customizable styles. Instead of manually overriding Bootstrap classes, you can **customize variables and recompile** your own version! ๐Ÿง 

22.1 ๐Ÿงฉ What is SCSS (Sass)?

SCSS (Sassy CSS) is an enhanced version of CSS that supports variables, nesting, functions, and mixins. Bootstrap uses SCSS for all its styling to make customization faster and cleaner.

  • ๐ŸŽฏ Variables โ€“ Store reusable values (like colors or font sizes).
  • ๐Ÿ“ Partials โ€“ Split CSS into smaller modular files.
  • ๐Ÿ” Mixins โ€“ Create reusable style functions.
  • ๐Ÿ”„ Imports โ€“ Combine multiple files efficiently.
// Example of SCSS
$primary-color: #0d6efd;

button {
  background: $primary-color;
  border-radius: 10px;
}
๐Ÿ’ก Note: SCSS files end with .scss and must be compiled into CSS using tools like Sass CLI, Node, or Webpack.

22.2 โš™๏ธ Setting Up Bootstrap Source Files

To customize Bootstrap deeply, download its **source files** instead of using the CDN. These contain all the SCSS files you can modify.

# Step 1: Create project folder
mkdir my-bootstrap-project
cd my-bootstrap-project

# Step 2: Install Bootstrap via npm
npm install bootstrap

# Step 3: Create main SCSS file
touch scss/custom.scss

Now you can import Bootstrapโ€™s SCSS source inside your custom file:

// custom.scss
// 1๏ธโƒฃ Import Bootstrap functions & variables first
@import "../node_modules/bootstrap/scss/functions";
@import "../node_modules/bootstrap/scss/variables";

// 2๏ธโƒฃ Override variables here
$primary: #6f42c1; // Custom purple theme
$body-font-family: 'Poppins', sans-serif;

// 3๏ธโƒฃ Import rest of Bootstrap
@import "../node_modules/bootstrap/scss/bootstrap";
๐ŸŒŸ Pro Tip: Always override variables before importing the main Bootstrap file!

22.3 ๐ŸŽจ Customizing Bootstrap Variables

Bootstrap provides hundreds of variables to easily tweak color schemes, typography, spacing, and component styles.

// colors
$primary: #ff5722;
$secondary: #607d8b;
$success: #28a745;
$danger: #dc3545;

// typography
$font-family-sans-serif: 'Inter', sans-serif;
$font-size-base: 1rem;
$headings-font-weight: 700;

// buttons
$btn-border-radius: 0.4rem;
$btn-padding-y: 0.5rem;
$btn-padding-x: 1rem;
โšก Remember: Changes here will apply automatically to all Bootstrap components that use these variables.

22.4 ๐Ÿง  Using Mixins for Reusable Styles

Mixins are reusable blocks of CSS logic โ€” think of them as โ€œstyle functions.โ€ Bootstrap has built-in mixins for breakpoints, transitions, gradients, and more.

๐Ÿ’ก Pro Tip: Mixins help you write DRY (Donโ€™t Repeat Yourself) CSS while keeping your design consistent.

22.5 ๐Ÿงฉ Compiling SCSS into CSS

Once youโ€™ve customized Bootstrapโ€™s SCSS files, youโ€™ll need to compile them into a single CSS file your website can use.

# Install Sass globally
npm install -g sass

# Compile SCSS โ†’ CSS
sass scss/custom.scss css/custom.css --watch

Now, link your new compiled CSS file in your HTML:

<link rel="stylesheet" href="css/custom.css">
๐Ÿง  In short: - Edit _variables.scss - Compile with sass - Use your new theme like magic โœจ

22.6 ๐ŸŽฏ Real Example โ€“ Custom Purple Theme

Letโ€™s say you want your brand to have a unique purple-and-gold aesthetic.

// custom.scss
$primary: #6f42c1;   // purple
$warning: #f9c74f;   // gold
$body-bg: #f8f9fa;
$body-color: #212529;
$border-radius: 0.5rem;

@import "../node_modules/bootstrap/scss/bootstrap";
<button class="btn btn-primary">Purple Button</button>
<button class="btn btn-warning">Gold Button</button>
๐Ÿ’ฅ Result: Every Bootstrap component (navbar, buttons, alerts) will automatically use your new purple-gold theme!
๐Ÿš€ Recap:
โœ… Bootstrap is built with SCSS โ€” easy to customize
โœ… Override variables for colors, fonts, spacing
โœ… Use mixins for responsive & reusable design
โœ… Compile SCSS into CSS using Sass tools
โœ… Build your own branded Bootstrap theme ๐ŸŽจ

Module 23 โ€“ Bootstrap Projects & Deployment

In this final module, youโ€™ll combine everything youโ€™ve learned โ€” grid systems, utilities, components, responsive design, and SCSS โ€” to build real-world web projects. Youโ€™ll also learn how to deploy your website online for free using GitHub Pages or Netlify. ๐ŸŒ

23.1 ๐Ÿ’ผ Project 1 โ€“ Portfolio Website

Letโ€™s create a personal portfolio website using Bootstrapโ€™s grid and card systems. This project helps you showcase your skills and projects beautifully.

<header class="bg-dark text-white text-center py-5">
  <h1>Hi, I'm Rohan ๐Ÿ‘‹</h1>
  <p>Frontend Developer | Designer | Freelancer</p>
  <a href="#projects" class="btn btn-primary">View My Work</a>
</header>

<section id="projects" class="container my-5">
  <div class="row g-4">
    <div class="col-md-4">
      <div class="card shadow">
        <img src="project1.jpg" class="card-img-top" alt="Project 1">
        <div class="card-body">
          <h5 class="card-title">E-Commerce UI</h5>
          <p class="card-text">A modern responsive shop layout built with Bootstrap 5.</p>
        </div>
      </div>
    </div>
    <div class="col-md-4">
      <div class="card shadow">
        <img src="project2.jpg" class="card-img-top" alt="Project 2">
        <div class="card-body">
          <h5 class="card-title">Blog Website</h5>
          <p class="card-text">A clean and minimal blog homepage layout.</p>
        </div>
      </div>
    </div>
    <div class="col-md-4">
      <div class="card shadow">
        <img src="project3.jpg" class="card-img-top" alt="Project 3">
        <div class="card-body">
          <h5 class="card-title">Landing Page</h5>
          <p class="card-text">A startup landing page with smooth navigation and call-to-actions.</p>
        </div>
      </div>
    </div>
  </div>
</section>
๐ŸŒŸ Concepts Used: Navbar, Grid, Cards, Buttons, Shadows, Responsive Columns

23.2 ๐Ÿ’ป Project 2 โ€“ Landing Page Design

Build a modern, product-focused landing page with a hero banner, features, and a call-to-action section.

<section class="bg-primary text-white text-center py-5">
  <div class="container">
    <h1>Launch Your Product with Style</h1>
    <p>A sleek landing page template built using Bootstrap 5.</p>
    <a href="#" class="btn btn-light btn-lg">Get Started</a>
  </div>
</section>

<section class="container py-5">
  <div class="row text-center">
    <div class="col-md-4">
      <i class="bi bi-lightning-charge display-4 text-primary"></i>
      <h4>Fast Performance</h4>
      <p>Built for speed and efficiency.</p>
    </div>
    <div class="col-md-4">
      <i class="bi bi-phone display-4 text-primary"></i>
      <h4>Mobile Ready</h4>
      <p>Looks great on every device.</p>
    </div>
    <div class="col-md-4">
      <i class="bi bi-palette display-4 text-primary"></i>
      <h4>Customizable</h4>
      <p>Easily modify colors, fonts, and layouts.</p>
    </div>
  </div>
</section>
๐Ÿ’ก Concepts Used: Containers, Icons, Typography, Buttons, Responsive Grids, Utility Classes

23.3 ๐Ÿ“ฐ Project 3 โ€“ Blog Layout with Cards

Create a blog homepage using Bootstrapโ€™s card layout and grid utilities.

<div class="container my-5">
  <div class="row g-4">
    <div class="col-md-6 col-lg-4">
      <div class="card h-100">
        <img src="blog1.jpg" class="card-img-top" alt="Post">
        <div class="card-body">
          <h5 class="card-title">Learn Bootstrap 5</h5>
          <p class="card-text">A complete beginnerโ€™s guide to Bootstrap components and utilities.</p>
          <a href="#" class="btn btn-outline-primary">Read More</a>
        </div>
      </div>
    </div>
  </div>
</div>
โšก Concepts Used: Cards, Buttons, Spacing, Images, Grid Layouts, Responsive Columns

23.4 โ˜๏ธ Hosting & Deployment (GitHub / Netlify)

Once your project is ready, you can publish it online **for free** using GitHub Pages or Netlify. ๐ŸŒ

๐Ÿ“˜ Deploy Using GitHub Pages

# Step 1: Initialize Git
git init
git add .
git commit -m "Initial Bootstrap project"

# Step 2: Push to GitHub
git remote add origin https://github.com/username/bootstrap-portfolio.git
git push -u origin main

# Step 3: Enable Pages
Go to GitHub โ†’ Repository โ†’ Settings โ†’ Pages โ†’ Select "main / root"
๐Ÿ’ฅ Your site will be live at: https://username.github.io/bootstrap-portfolio

โ˜๏ธ Deploy Using Netlify

# Option 1: Drag & Drop
1๏ธโƒฃ Go to https://www.netlify.com/
2๏ธโƒฃ Log in โ†’ "Add new site" โ†’ "Deploy manually"
3๏ธโƒฃ Drag your project folder onto the upload area

# Option 2: Connect GitHub Repo
1๏ธโƒฃ Click "Import from Git"
2๏ธโƒฃ Choose your GitHub repo
3๏ธโƒฃ Click "Deploy Site"
๐Ÿš€ In seconds, your Bootstrap site is online โ€” no servers, no coding, no cost!

23.5 ๐Ÿง  Final Project Tips & Best Practices

  • ๐Ÿงฉ Always use the grid system for structure โ€” avoid manual CSS positioning.
  • ๐Ÿ“ฑ Test responsiveness on multiple devices (mobile, tablet, desktop).
  • ๐ŸŽจ Use custom SCSS for brand colors and consistent theming.
  • ๐Ÿงญ Optimize images (JPG/WEBP) for faster loading.
  • ๐Ÿ“ฆ Use Bootstrap icons for modern and lightweight visuals.
  • ๐Ÿšฆ Use the โ€œInspectโ€ tool to debug and preview responsive layouts.
๐ŸŒŸ Pro Tip: Keep your design minimal, color-balanced, and responsive. Bootstrap provides the structure โ€” your creativity gives it life!
๐Ÿš€ Recap:
โœ… Built 3 real-world projects (Portfolio, Landing Page, Blog)
โœ… Used all Bootstrap components & utilities
โœ… Learned how to deploy to GitHub Pages & Netlify
โœ… Followed best practices for design, speed & responsiveness
๐ŸŽ“ Congratulations โ€” Youโ€™ve completed the Bootstrap Full Course!