Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to Remove URL from Printing the Page ?

  • Last Updated : 02 Apr, 2020

When you print a Web page from your Web browser, you’ll notice that the printout contains some extra pieces of information like the page number, the date and the web page’s URL at the bottom of the page. Some times you may not need this information in your printout in order to tidy up your work.
So here are a few methods that let you print web pages without the extra information appearing at the bottom of the page.

There are two approaches through which we can achieve this.

  1. Programatical Approach: Here are few simplest ways of doing it.
    Example 1:

    @page {
        size: auto;
        margin: 0;

    Example 2:

    @print {
        @page :footer {
            display: none
        @page :header {
            display: none

    But there may occur some issue on browser due to which the above code does not work. So the following code can be used to overcome browser issues.

    Example 3:

    @media print {
        @page {
            margin-top: 0;
            margin-bottom: 0;
        body {
            padding-top: 72px;
            padding-bottom: 72px ;
  2. Browser side Approach: There are the steps to disable the header and the footer in a browser.
    • Internet Explorer: Go to the File menu and choose Page Setup from the drop-down menu and click the menu that displays URL in the Headers and Footers section and select “-Empty-” from the menu.
    • Mozilla Firefox: Go to the Page setup option from the file menu and click the Margins & Header/Footer tab. Change each value under Headers & Footers to --blank--.
    • Google Chrome: Go to the Menu icon in the top right corner of the browser and Click on Print button. Uncheck the “Headers and footers” option underneath the “Margins” option.
    • Apple Safari: Go to the print option from the menu and the Print dialog appears. Uncheck the “Print headers and footers” option.

      Literally, in all the browsers, do the same following case to remove the header and footer part.

Sample Output:

  • When Url is visible:

    Also, note that the headers and footers box is checked.
  • When Url is removed:

    Note that the headers and footers box is unchecked.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!