Semantically Correct CSS Pagination

by ian.purton

Here I show a method for generating pagination for search results and long list pages using
semantically correct HTML and CSS.

Pagination as HTML Markup

I’ve modeled pagination as an un-ordered list of links. There are three class declarations so that I can
identify the list “pagination” and the first and last items, “leader” and “last”
respectively.

This markup is fairly straight forward to generate on the fly, but note that you’ll
need the total count of items so that you can generate the Page 1 of COUNT.

This markup is a lot easier to generate that similar markup built with tables.

The CSS To Style The Pagination

This entry was posted on Monday, March 6th, 2006 at 7:43 am and is filed under CSS. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

  • Anonymous
    Good work :)
blog comments powered by Disqus