Simple pagination

What is simple pagination, one might ask? Pagination in it's purest form is a previous and a next link or button.

Poor example from a well known CMS

Previous - Next

When you're at the last page, it would look this:

It gets even worse

Previous

This is kind of lame. Any kind of navigation should stay in the same place (and not jump around the website or application). An option can't just dissapear. We need to give the pagination more context: where exactly am I? And why can't I go to the next page now?

Here's my proposal:

Example
  • 1/13
Example
Example

And some example code:

				
  • 1/13

You HTML purists might wonder why we wrap the text in three different elements. The reasoning behind this is:

  • <a> is for links
  • <strong> is for your current location
  • <span> is used as a generic inline element to mute the unavailable options

Alternatively one could use the select-element coupled with some javascript to quickly skip to a certain page. However, it is very speculative to assume a user wants to be at some page exactly. Pagination is for browsing long lists of generic items and should by no means be used as a navigation.

Example