Print HTML - Page No

Dear community, does anyone have any HTML script samples on how to print page no?

P.S. I do not have any knowledge in writing codes.

Thank you in advance.

<!-- FOOTER -->
<div id="footer-html" class="visible-pdf">
    <p id="pagenum">
        {{ _("Page {0} of {1}").format('<span class="page"></span>', '<span class="topage"></span>') }}
     {{ footer }}

<span class="page"></span> will show the current page number, <span class="topage"></span> the total number of pages (only works in PDF, not in preview).