Lesson 15: Pagination in Bootstrap 5

This basic Bootstrap lesson will discuss pagination. Bootstrap 5 handles out-of-order lists, just like many other UI elements.

This basic Bootstrap lesson will discuss pagination. Bootstrap 5 handles out-of-order lists, just like many other UI elements.

 

Pagination in Bootstrap 5

The following table lists the classes that Bootstrap provides for pagination:

.pagination

Description: Add this class for pagination on a website.

Sample code:

    • «
    • 1

..

.disabled, .active

Description: Customize links .disalbedfor non-clickable links and .activefor the current page.

    • «
    • 1(current)

..

.pagination-lg, .pagination-sm

Description: Use these classes for items of different sizes.

Sample code:

. . .

Basic pagination

If you have a website with many different pages, you might want to add some pagination to each page.

To create basic pagination, add the `.pagination` class to an element.

Then, add .page-item to each tag.

  • and a class .page-linkinto each link inside
  • :

For example:

 Bootstrap Example 

Pagination

To create basic pagination, add the `.pagination` class to a `ul` element. Then, add `.page-item` to each `li` tag and a `.page-link` class to each link inside the `li` tag.

  • previous
  • 1
  • 2
  • 3
  • Next

 

Operating status

The class .activeis used to highlight the current page:

For example:

 Bootstrap Example 

Paging - Operating Status

Add the class .active to let users know which page of TipsMake.com they are currently on:

  • previous
  • 1
  • 2
  • 3
  • Next

Disabled state

Classes .disableare used for pages that cannot be clicked. For example:

 Bootstrap Example 

TipsMake.com pagination - Inactive status

Add the `.disabled` class to the disabled equipment:

  • previous
  • 1
  • 2
  • 3
  • Next

 

Paging size

Pagination blocks in Bootstrap 5 can also be resized to be larger or smaller. Add .pagination-lgto make the block larger or .pagination-smto make it smaller. For example:

 Bootstrap Example 

Pagination block size on TipsMake.com

Add .pagination-lg for larger blocks or .pagination-sm for smaller blocks.

Small:

  • previous
  • 1
  • 2
  • 3
  • Next

Default:

  • previous
  • 1
  • 2
  • 3
  • Next

Small:

  • previous
  • 1
  • 2
  • 3
  • Next

 

Adjust pagination margins

Use utility classes to change pagination margins in Bootstrap 5. For example:

 Bootstrap Example 

Page margins on TipsMake.com.com

Use utility classes to change pagination margins:

  • previous
  • 1
  • 2
  • Next
  • previous
  • 1
  • 2
  • Next
  • previous
  • 1
  • 2
  • Next

 

Breadcrumbs

Breadcrumbs are a special form of pagination, a collection of links that help users determine their relative position within the page structure. The class .breadcrumbindicates .breadcrumb-itemthe current page position in the navigation hierarchy. For example:

 Bootstrap Example 

Breadcrumbs

The classes .breadcrumb and .breadcrumb-item specify the current page position in the navigation hierarchy on TipsMake.com:

Above is everything you need to know about pagination methods in Bootstrap 5. You can apply many of the above pagination styles to your website according to your needs and development goals.

Related posts
Other Program articles
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup