Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
.pag {
clear: both;
content: "";
display: table;
margin: 0 10px 10px;
}
.pag a {
color: #000000;
float: left;
padding: 12px 18px;
text-decoration: none;
}
.pag a.active {
background-color: #8ebf42;
color: #ffffff;
}
.pag a:hover:not(.active) {
background-color: #ccc;
}
</style>
</head>
<body>
<h2>Pagination</h2>
<div class="pag">
<a href="#">&laquo;</a>
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a class="active" href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>