formatting in HTML for pagination