How to make a Pagination using HTML and CSS ?

CSS code

<style> .center { text-align: center; } .pagination ( } display: inline-block; .pagination a{ color: black; float: left; padding: 8px 16px; text-decoration: none; transition: background-color .35; border: 1px solid #ddd; margin: 0 4px; } .pagination a.active { background-color: #002468; color: white; } .pagination a:hover:not(.active) {background-color: #ddd;} </style> 




Html code

<div class=”center”> <div class=”pagination”> <a href=”#”>&laquo;</a> <a href=”#”>1</a> <a href=”#” class=”active”>2</a> <a href=”#”>3</a> <a href=”#”>4</a> <a href=”#”>5</a> <a href=”#”>6</a> <a href=”#”>&raquo;</a> </div> </div>


Leave a Comment

Your email address will not be published. Required fields are marked *