Back to Full Page Component
Cart Page

Cart Full Page

Cart Page:  i. Breadcrumb Section.  ii. Cart Items Table (Image, Name, Qty update, Price).  iii. Apply Coupon Code Section.  iv. Cart Total & Proceed Button.  v. You May Also Like Section (using bootstrap carousel).

#Cart Page#Full Page

Live preview

Source code

html
<div class="container py-4">
  <!-- i. Breadcrumb Section -->
  <nav aria-label="breadcrumb" class="mb-4">
    <ol class="breadcrumb bg-light p-3 rounded-4 shadow-sm">
      <li class="breadcrumb-item"><a href="#" class="text-decoration-none">Home</a></li>
      <li class="breadcrumb-item"><a href="#" class="text-decoration-none">Shop</a></li>
      <li class="breadcrumb-item active" aria-current="page">Shopping Cart</li>
    </ol>
  </nav>

  <div class="row g-4">
    <!-- ii. Cart Items Table -->
    <div class="col-lg-8">
      <div class="card border-0 shadow-sm rounded-4 overflow-hidden">
        <div class="table-responsive">
          <table class="table table-hover align-middle mb-0">
            <thead class="bg-light">
              <tr>
                <th class="py-3 px-4 border-0">Product</th>
                <th class="py-3 border-0">Price</th>
                <th class="py-3 border-0">Quantity</th>
                <th class="py-3 border-0 text-end px-4">Total</th>
                <th class="py-3 border-0"></th>
              </tr>
            </thead>
            <tbody>
              <!-- Item 1 -->
              <tr>
                <td class="px-4 py-3">
                  <div class="d-flex align-items-center">
                    <img src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=100" class="rounded-3 me-3 border" width="70" alt="Product">
                    <div>
                      <h6 class="mb-0 fw-bold">Red Sport Shoes</h6>
                      <small class="text-muted">Size: 42, Color: Red</small>
                    </div>
                  </div>
                </td>
                <td>$85.00</td>
                <td>
                  <div class="input-group input-group-sm" style="width: 100px;">
                    <button class="btn btn-outline-secondary">-</button>
                    <input type="text" class="form-control text-center shadow-none border-secondary" value="1">
                    <button class="btn btn-outline-secondary">+</button>
                  </div>
                </td>
                <td class="text-end px-4 fw-bold">$85.00</td>
                <td class="text-center"><button class="btn btn-link link-danger p-0"><i class="bi bi-trash"></i></button></td>
              </tr>
              <!-- Item 2 -->
              <tr>
                <td class="px-4 py-3">
                  <div class="d-flex align-items-center">
                    <img src="https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=100" class="rounded-3 me-3 border" width="70" alt="Product">
                    <div>
                      <h6 class="mb-0 fw-bold">Studio Headphones</h6>
                      <small class="text-muted">Color: Matte Black</small>
                    </div>
                  </div>
                </td>
                <td>$299.00</td>
                <td>
                  <div class="input-group input-group-sm" style="width: 100px;">
                    <button class="btn btn-outline-secondary">-</button>
                    <input type="text" class="form-control text-center shadow-none border-secondary" value="1">
                    <button class="btn btn-outline-secondary">+</button>
                  </div>
                </td>
                <td class="text-end px-4 fw-bold">$299.00</td>
                <td class="text-center"><button class="btn btn-link link-danger p-0"><i class="bi bi-trash"></i></button></td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>

      <!-- iii. Apply Coupon Code Section -->
      <div class="mt-4 card border-0 shadow-sm rounded-4 p-3">
        <div class="d-md-flex align-items-center justify-content-between gap-3">
          <div class="input-group" style="max-width: 400px;">
            <input type="text" class="form-control rounded-start-pill border-secondary border-end-0 px-3" placeholder="Enter Coupon Code">
            <button class="btn btn-dark rounded-end-pill px-4 fw-bold">Apply</button>
          </div>
          <button class="btn btn-outline-dark rounded-pill px-4 mt-3 mt-md-0 fw-bold">Update Cart</button>
        </div>
      </div>
    </div>

    <!-- iv. Cart Total & Proceed Button -->
    <div class="col-lg-4">
      <div class="card border-0 shadow-sm rounded-4 p-4">
        <h5 class="fw-bold mb-4">Cart Summary</h5>
        <div class="d-flex justify-content-between mb-2">
          <span class="text-muted">Subtotal</span>
          <span class="fw-bold">$384.00</span>
        </div>
        <div class="d-flex justify-content-between mb-2">
          <span class="text-muted">Shipping</span>
          <span class="fw-bold text-success">Free</span>
        </div>
        <div class="d-flex justify-content-between mb-4">
          <span class="text-muted">Tax</span>
          <span class="fw-bold">$12.00</span>
        </div>
        <hr>
        <div class="d-flex justify-content-between mb-4">
          <h5 class="fw-bolder">Total</h5>
          <h5 class="fw-bolder text-primary">$396.00</h5>
        </div>
        <button class="btn btn-primary w-100 btn-lg rounded-pill py-3 fw-bold mb-3">Proceed to Checkout</button>
        <a href="#" class="btn btn-link link-dark text-decoration-none w-100 text-center small"><i class="bi bi-arrow-left me-2"></i>Continue Shopping</a>
      </div>
    </div>
  </div>

  <!-- v. You May Also Like Section (Bootstrap Carousel) -->
  <div class="mt-5 pt-5">
    <h4 class="fw-bold text-center mb-4">You May Also Like</h4>
    <div id="likedItemsCarousel" class="carousel slide" data-bs-ride="carousel">
      <div class="carousel-inner">
        <div class="carousel-item active">
          <div class="row g-4 px-5">
            <div class="col-6 col-md-3">
              <div class="card border-0 shadow-sm rounded-4 p-2 text-center h-100">
                <img src="https://images.unsplash.com/photo-1546868801-89930f46dcc2?w=200" class="card-img-top rounded-4" alt="Item">
                <div class="card-body py-2">
                  <h6 class="small fw-bold mb-1">Smart Watch</h6>
                  <p class="text-primary small fw-bold mb-0">$120.00</p>
                </div>
              </div>
            </div>
            <div class="col-6 col-md-3">
              <div class="card border-0 shadow-sm rounded-4 p-2 text-center h-100">
                <img src="https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=200" class="card-img-top rounded-4" alt="Item">
                <div class="card-body py-2">
                  <h6 class="small fw-bold mb-1">Luxury Watch</h6>
                  <p class="text-primary small fw-bold mb-0">$250.00</p>
                </div>
              </div>
            </div>
            <div class="col-6 col-md-3 d-none d-md-block">
              <div class="card border-0 shadow-sm rounded-4 p-2 text-center h-100">
                <img src="https://images.unsplash.com/photo-1572635196237-14b3f281503f?w=200" class="card-img-top rounded-4" alt="Item">
                <div class="card-body py-2">
                  <h6 class="small fw-bold mb-1">Aviator Shades</h6>
                  <p class="text-primary small fw-bold mb-0">$89.00</p>
                </div>
              </div>
            </div>
            <div class="col-6 col-md-3 d-none d-md-block">
              <div class="card border-0 shadow-sm rounded-4 p-2 text-center h-100">
                <img src="https://images.unsplash.com/photo-1525966222134-fcfa99b8ae77?w=200" class="card-img-top rounded-4" alt="Item">
                <div class="card-body py-2">
                  <h6 class="small fw-bold mb-1">White Sneakers</h6>
                  <p class="text-primary small fw-bold mb-0">$65.00</p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <button class="carousel-control-prev" type="button" data-bs-target="#likedItemsCarousel" data-bs-slide="prev" style="width: 5%;">
        <i class="bi bi-chevron-left text-dark fs-3"></i>
      </button>
      <button class="carousel-control-next" type="button" data-bs-target="#likedItemsCarousel" data-bs-slide="next" style="width: 5%;">
        <i class="bi bi-chevron-right text-dark fs-3"></i>
      </button>
    </div>
  </div>
</div>

<style>
  .breadcrumb-item+.breadcrumb-item::before {
    content: ">";
  }

  .table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
  }

  .card:hover {
    transform: none;
  }

  .btn-link:hover {
    color: #dc3545;
  }

</style>
How to use this cart page

Add it to your project in three steps

  1. Copy the HTML from the Source code tab above and paste it inside your <div class="container"> wrapper.
  2. Make sure the Bootstrap 5 CDN CSS and JS are linked in your <head> and before </body>. Any CodeShikhi component assumes Bootstrap 5.3+ is already loaded.
  3. Swap the placeholder text, links, and images for your own content — the layout, spacing, and responsive behaviour stay intact.

The Cart Full Page block is fully responsive and works on every screen from 320 px phones to 1440 px+ desktops without additional CSS.

Accessibility checklist

Ship it accessible by default

  • Use semantic HTML landmarks — <header>, <nav>, <main>, <footer> — so screen readers can navigate your page.
  • Give every image an alt attribute (empty alt="" if it's decorative).
  • Label icon-only buttons with aria-label and keep focus outlines visible.
  • Maintain a contrast ratio of at least 4.5:1 for body text against its background.
  • Test the cart page with Tab / Shift+Tab and Enter — every interactive element should be reachable.
Step-by-step customisation

Make it match your brand

  1. Change the colour palette by overriding Bootstrap CSS variables: --bs-primary, --bs-body-bg.
  2. Adjust spacing with utility classes such as py-5, gap-4, and mt-lg-5 — no custom CSS required.
  3. Swap the typography by loading a Google Font in your <head> and setting --bs-body-font-family.
  4. Replace stock images with brand assets. Keep dimensions similar to avoid layout shift.
  5. Preview at multiple breakpoints (mobile, tablet, desktop) and tweak column spans if content wraps awkwardly.

Need the full theory? Read our Bootstrap 5 Technical Introduction Guide for grid, breakpoints, and Sass customisation in depth.

About the Cart Full Page cart page

This cart page is part of the free CodeShikhi (কোড শিখি) Bootstrap 5 library — a growing collection of copy-paste website building blocks curated for learners and freelance developers. Every block is written in clean, semantic HTML with Bootstrap utility classes, keeps custom CSS to the minimum needed, and works without any build step. Use it as a starting point and adapt the markup, colours, and content to fit your project's brand and audience.

If you spot a bug, want a new variation, or would like to contribute an improvement, reach us via the contact page — we ship updates weekly based on community feedback.

Detailed Technical Breakdown

Detailed Technical Breakdown: Cart Full Page

Browser compatibility & standards

The Cart Full Page cart page is authored against Bootstrap 5.3, which drops legacy Internet Explorer support and targets modern evergreen engines — Chrome, Edge, Firefox, Safari, and all Chromium-based mobile browsers. Because the markup relies exclusively on the standard CSS features that ship with Bootstrap (Flexbox, CSS Grid, CSS custom properties, and the responsive breakpoint system), you can safely deploy this cart page to any browser released in the last five years without polyfills. If you need to support very old WebKit or Samsung Internet builds, load the standard Bootstrap 5 CSS from the official jsDelivr CDN — the bundled autoprefixer output already covers those vendor prefixes.

Performance impact

Performance-wise this block is intentionally light. The HTML payload for a typical Bootstrap cart page is under 4 KB gzipped, and it shares the same Bootstrap CSS/JS bundle you are already loading — meaning the marginal cost of adding it to a page is effectively zero KB on repeat visits. There is no JavaScript framework runtime, no hydration cost, and no client-side data fetching. The only images referenced are placeholders you will replace with your own assets; when you do, serve them as WebP or AVIF, add explicit width and height attributes to prevent layout shift (CLS), and lazy-load anything below the fold with loading="lazy". These small changes typically move Lighthouse Performance scores from the mid-80s into the 95+ range on both mobile and desktop.

Utility classes used

The cart page leans on Bootstrap's utility-first classes to stay declarative: spacing utilities (p-*, m-*, gap-*), the flex helpers (d-flex, align-items-*, justify-content-*), the grid system (container, row, col-lg-*), typography helpers (display-*, lead, text-*), and colour utilities that resolve to Bootstrap CSS variables such as --bs-primary, --bs-body-bg, and --bs-border-color. Because everything is expressed as utilities you can re-theme the entire cart page by overriding a handful of CSS variables at the :root level — no Sass recompile required.

Exact customisation steps

  1. Copy the source HTML from the tab above and paste it inside your <body>. The outer <div class="container"> wrapper is already included so the cart page sits on the Bootstrap grid.
  2. Replace the placeholder headings and paragraphs with your own copy. Keep heading levels in order (h1h2h3) so screen readers and search engines can parse the document outline.
  3. Swap any <img> tags for your brand assets. Match the original aspect ratio to avoid layout shift, and always fill in a meaningful alt attribute.
  4. Retune the palette by overriding CSS variables::root { --bs-primary: #4f46e5; --bs-body-bg: #ffffff; }. All utility colour classes update automatically.
  5. Test at each Bootstrap breakpoint — sm (576 px), md (768 px),lg (992 px), xl (1200 px), xxl (1400 px) — using your browser's device toolbar, and tweak column spans if long content wraps.
  6. Ship it with the standard Bootstrap 5 CDN in the <head> and the JS bundle before the closing </body>. No build step required.
Technical & Performance Integration Guide

Technical & Performance Integration Guide — Cart Full Page (full-page template)

When and why to use this full-page template

A full-page template stitches together every block on this site into one deployable document: navigation, hero, feature grid, social proof, call to action and footer. Because it is a complete page, the integration rules shift from "drop this in" to "own the whole document head".

Accessibility & ARIA attributes

Exactly one <h1>, one <header>, one <main>, one <footer> per document. Add a skip link (<a class="visually-hidden-focusable" href="#main">Skip to content</a>) as the first focusable element so keyboard users can bypass the navigation. Set the correct lang attribute on <html> — screen readers use it to pick the right pronunciation engine, which matters when you mix Bangla and English content.

Performance notes for this pattern

Load Bootstrap CSS in the head and the JS bundle just before </body>. Inline the handful of critical CSS rules the hero needs and let everything else arrive normally. Lazy-load every image below the fold, preload the hero image and the primary webfont, and self-host fonts with font-display: swap if you want to remove a third-party connection entirely. A page built this way typically lands in the 90s on mobile Lighthouse without further tuning.

Three customisation tricks

  • Keep one and only one navbar and one footer — duplicated landmarks confuse both crawlers and screen readers.
  • Give every section an id and link the navbar anchors to them for instant on-page navigation.
  • Add Organization and WebSite JSON-LD once in the head so the whole template ships search-ready.

Mistakes to avoid

  • Copying two heroes into the same document, leaving two <h1> elements.
  • Forgetting the responsive viewport meta tag, which makes the entire mobile layout render at desktop width.

More designs in this section