October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

Bootstrap Pagination: Key Markup, States, and Styling Facts

Add page navigation to a Bootstrap site with a practical Bootstrap 5.3 example, plus guidance on current and disabled states, sizing, and alignment.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Bootstrap pagination is a free, built-in way to add page navigation: place page links in a list inside a <nav> landmark and apply Bootstrap’s pagination classes. The examples below target Bootstrap 5.3; use the documentation for the version installed in your project if it differs.

How do I add pagination in Bootstrap?

Use a navigation landmark containing a <ul class="pagination">. Each page control belongs in a <li class="page-item">, and a working destination uses <a class="page-link">. Replace the example URLs with real destinations for your site.

As an Amazon Associate I earn from qualifying purchases.

<nav aria-label="Search results pages">
  <ul class="pagination">
    <li class="page-item">
      <a class="page-link" href="/search?page=1">Previous</a>
    </li>
    <li class="page-item">
      <a class="page-link" href="/search?page=1">1</a>
    </li>
    <li class="page-item active">
      <a class="page-link" href="/search?page=2" aria-current="page">2</a>
    </li>
    <li class="page-item">
      <a class="page-link" href="/search?page=3">3</a>
    </li>
    <li class="page-item">
      <a class="page-link" href="/search?page=3">Next</a>
    </li>
  </ul>
</nav>

The navigation label identifies its purpose to assistive technology. Choose a specific label, such as “Search results pages,” when the page has multiple navigation landmarks.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How should the current page be marked?

Add .active to the current page’s .page-item. When that item is an anchor, Bootstrap recommends aria-current="page" to identify it as the current page to assistive technology. If the current page should not be a link, use a <span class="page-link"> instead.

How do I disable Previous or Next?

The .disabled class supplies disabled styling, but styling alone does not make an anchor fully unavailable. Bootstrap notes that pointer-events: none does not address keyboard navigation. For a disabled anchor, add tabindex="-1" and use custom JavaScript to disable its functionality. If the control should not be interactive at all, use a <span class="page-link"> rather than an anchor.

How can I change pagination size or alignment?

Bootstrap 5.3 documents small and large pagination variants. Add .pagination-sm or .pagination-lg to the pagination list; omit either class for the default size.

  • .pagination-sm makes the pagination smaller.
  • .pagination-lg makes it larger.

For alignment, apply a flex utility to the list. For example, .justify-content-center centers it and .justify-content-end aligns it to the end. Choose based on the surrounding layout rather than assuming one alignment is universally best.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What if I use arrows instead of Previous and Next?

If the design uses symbols in place of visible words, provide screen-reader support with ARIA attributes. An arrow alone may not convey the control’s purpose; give each control an accessible name that describes its action or destination.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Which Bootstrap version should I follow?

The title does not identify a Bootstrap version, so the code here follows the official Bootstrap 5.3 pagination documentation. Bootstrap 5.0 documents the same core list-and-link structure, but details and wording can differ. Confirm the version your project loads, then follow its matching documentation: Bootstrap 5.3 Pagination or Bootstrap 5.0 Pagination.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.