Bootstrap pagination uses a labeled navigation landmark containing a list: apply .pagination to the <ul>, .page-item to each list item, and .page-link to each link. Before copying markup, check which Bootstrap version your project uses and consult its matching component documentation.
Check your Bootstrap version first
The examples below follow the Bootstrap 5.3 pagination component. If your project uses Bootstrap 4 or another Bootstrap 5 release, check that version’s documentation before using the markup or classes. Bootstrap 5.0 migration notes, for example, document pagination changes including customizable left margin and transitions; do not assume component behavior is identical across versions. See the Bootstrap 5.3 pagination documentation, the Bootstrap 5.0 pagination documentation, and the Bootstrap 5.0 migration notes.
As an Amazon Associate I earn from qualifying purchases.
Build the pagination navigation
Wrap the list in a <nav> landmark and give it a descriptive accessible name. The name should explain what the controls navigate; for example, Bootstrap uses “Search results pages” for search pagination. Use links that point to actual pages, and make previous and next controls understandable without relying on an icon alone.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems<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>
Replace the example destinations with the routes and page numbers used by your application. When the list is generated dynamically, ensure it reflects the actual result set: links should not lead to nonexistent pages, and the current-page state should match the page being shown.
#1 Best Overall
Mark the current page accurately
Apply .active to the current page’s .page-item. If the current page is an anchor, add aria-current="page" to that anchor so its status is available to assistive technology. Only one page in a given pagination control should be marked current.
If the current page should not be clickable, use a <span class="page-link" aria-current="page"> within the active list item instead of an anchor. A non-interactive span does not need aria-current according to Bootstrap’s component guidance, though including it can explicitly communicate the current-page state. Choose one approach consistently with the interaction your interface intends.
Rank #2
Handle unavailable previous and next controls
When there is no previous or next page, Bootstrap’s .disabled class changes the item’s appearance, but it does not by itself make an anchor fully unavailable to keyboard users. Bootstrap warns that pointer-event suppression alone does not handle keyboard navigation.
- Prefer a span when the control is unavailable: replacing the anchor with a non-interactive
<span class="page-link">removes the link from keyboard focus and prevents activation. - If you retain an anchor: add
tabindex="-1"and implement custom JavaScript to prevent activation as well as keyboard access. Merely applying.disabledis not sufficient.
Do not leave a disabled-looking link pointing to a valid or misleading destination. The visual state, keyboard behavior, and actual destination should agree.
Rank #3
Choose size and alignment
After the navigation works correctly, use Bootstrap’s documented pagination size classes and flexbox utilities to fit the layout.
| Need | Bootstrap option |
|---|---|
| Default size | .pagination |
| Smaller controls | .pagination.pagination-sm |
| Larger controls | .pagination.pagination-lg |
| Center the list | .pagination.justify-content-center |
| Align the list to the end | .pagination.justify-content-end |
For example, to center a small pagination list, put both classes on the list: <ul class="pagination pagination-sm justify-content-center">. See the Bootstrap 5.3 component examples for the documented variants.
Rank #4
Check accessibility and behavior in the finished page
Bootstrap provides component styles, not an automatic accessibility guarantee. Its accessibility guidance says a project’s overall accessibility depends substantially on the author’s markup, additional styling, and scripting. It also cautions that some default foreground and background color combinations may fall below WCAG 2.1 contrast recommendations. Review the actual combinations in your interface rather than assuming the defaults meet your needs. Read Bootstrap’s accessibility guidance.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchQuick Recap
Best Value
- Use the keyboard to move through the controls; confirm disabled items cannot receive focus or activate.
- Confirm the navigation landmark has a purpose-specific accessible name, especially when the page contains more than one pagination region.
- Check that exactly the displayed page is identified as current.
- Verify visible focus, text/background contrast, and that every active link reaches the intended page.
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.




