Pagination is used to separate the content into discrete pages that is short and easy to understand. Materialize CSS provide classes to create a pagination bar that holds the links to the other pages.
The pagination class is used to set the <ul> list element as a pagination component. The pages that have to be shown are defined inside this component as <li> items. A left and right arrow icon can be used to show the buttons for moving to the next or previous page.
Syntax:
<ul class="pagination">
<li class="disabled">
<a href="#!">
<i class="material-icons">
chevron_left
</i>
</a>
</li>
<li class="active">
<a href="#!">1</a>
</li>
<li class="waves-effect">
<a href="#!">2</a>
</li>
<li class="waves-effect">
<a href="#!">3</a>
</li>
<li class="waves-effect">
<a href="#!">
<i class="material-icons">
chevron_right
</i>
</a>
</li>
</ul>
Example:
HTML
<html> <head> <meta name="viewport" content= "width=device-width, initial-scale=1.0" /> <!-- Import Material Icon Fonts --> <link rel="stylesheet" href= <!-- Include Compiled and minified Materialize CSS --> <link rel="stylesheet" href= <!-- Include jQuery --> <script type="text/javascript" src= </script> <!-- Compiled and minified Materialize JavaScript --> <script src= </script> </head> <body> <div class="card-panel"> <h3 class="center"> Pagination </h3> <!-- Use the pagination class --> <ul class="pagination center-align"> <!-- Use icon inside list item for the left arrow --> <li class="disabled"> <a href="#!"> <i class="material-icons"> chevron_left </i> </a> </li> <!-- Various classes that can be used with the page links --> <li class="waves-effect"> <a href="#!">1</a> </li> <li class="active green"> <a href="#!">2</a> </li> <li class="waves-effect"> <a href="#!">3</a> </li> <li class="waves-effect"> <a href="#!">4</a> </li> <li class="waves-effect"> <a href="#!">5</a> </li> <!-- Use icon inside list item for the right arrow --> <li class="waves-effect"> <a href="#!"> <i class="material-icons"> chevron_right </i> </a> </li> </ul> </div> </body> </html> |
Output:

Recommended Posts:
- PHP Pagination | Set 3
- CSS | Pagination
- PHP Pagination | Set 1
- PHP Pagination | Set 2
- Bootstrap 4 | Pagination
- Bulma | Pagination
- How to make a Pagination using HTML and CSS ?
- Bootstrap (Part-7) | Alerts , Wells, Pagination and Pager
- Materialize CSS | Icons
- Materialize CSS Navbars
- Materialize CSS | Collections
- Materialize CSS | Typography
- Materialize CSS | Tooltips
- Materialize CSS | Waves
- Materialize | Cards
- Materialize | Collapsible
- Materialize CSS | Footer
- Materialize CSS | Preloader
- Materialize CSS | Helpers
- Materialize CSS | Tables
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

