Pagination indicates a series of related content that exists across multiple pages.Linear content flows — such as pages like this one — should almost never be broken up into multiple screens. It’s better to show the full article on one long screen than to inflict the pain of additional steps on users when all they want to do is read a page, and thus stay within that one item.
- Presenting the user with listings, such as categories, search results pages, archives and image galleries. In these cases the users goal is not to peruse the full list, but rather to find a specific item and click through to that destination page.
- The users need a well prioritized list and are likely to find what they need close to the top. To focus users’ attention and improve response time, you can start by showing a fairly short list, and then offer pagination options for progressing further down the list if needed.
Many users like to see all options on a single page, rather than clicking from page to page looking at products. In user testing, we have found a View All option to be helpful to some users. More important, the View All option usually doesn't bother users who don't use it. View All is particularly important for lists that cannot be sorted well, as well as for items that are more a question of individual taste than of specific attributes.
- Infinite scrolling. Infinite scrolling is a web-design technique that loads content continuously as the user scrolls down the page, eliminating the need for pagination. Continuous scrolling is useful for content that streams constantly and has a relatively flat structure, where each unit of content belongs at the same level of hierarchy and has similar chances of being interesting to users. Infinite scrolling is not recommended for goal-oriented finding tasks, such as having to locate specific content or compare options.
Follow the HTML stucture listed in the right panel to get the pagination into your project.
<!-- Pagination --> <ul class="pagination"> <li> <button class="go2first btn" disabled>Go to first page</button> </li> <li> <button class="prev btn" disabled>Previous page</button> </li> <li> <a href="#page-1">1</a> </li> <li> <span>of</span> </li> <li> <a href="#page-8">8</a> </li> <li> <button class="next btn">Next page</button> </li> <li> <button class="go2last btn">Go to last page</button> </li> </ul>