Quick Answer: How do I print HTML?

Can you print an HTML document?

First, open the HTML file or load the web site page in your browser window. Then select ‘Print…’ from the web browser’s File menu. You will then be able to convert the HTML web page to a PDF copy of the page on your computer.

How do I convert a HTML File to PDF?

How to convert HTML pages into PDF files:

  1. On a Windows computer, open an HTML web page in Internet Explorer, Google Chrome, or Firefox. …
  2. Click the “Convert to PDF” button in the Adobe PDF toolbar to start the PDF conversion.
  3. Enter a file name and save your new PDF file in a desired location.

How do you print HTML content on click of a button but not the page?

1 Answer

  1. function printDiv(divName) {
  2. var printContents = document.getElementById(divName).innerHTML;
  3. var originalContents = document.body.innerHTML;
  4. document.body.innerHTML = printContents;
  5. window.print();
  6. document.body.innerHTML = originalContents;
  7. }

How do I open an HTML document?

Open HTML File From Within Chrome

  1. Choose File from the Chrome ribbon menu. Then select Open File.
  2. Navigate to your HTML file location, highlight the document and click Open.
  3. You will see your file open in a new tab.
THIS IS INTERESTING:  How do I keep a checkbox checked in HTML?

How do I save a HTML document?

Saving HTML Documents

  1. On the main menu, click File > Save.
  2. On the HTML editor toolbar, click the Save icon .
  3. Press CTRL+S.
  4. Right-click within the HTML document, click File > Save. If the file has never been saved before, CuteFTP opens the Save As dialog box.

What program opens HTML files?

Any web browser, like Edge, Firefox, Chrome, Opera, Internet Explorer, etc., will open and properly display HTM and HTML files. In other words, opening one of these files in a browser will “decode” what the HTM or HTML file is describing and display the content correctly.

How do I print a specific area in HTML?

You can use simple JavaScript to print a specific div from a page. I made this jQuery extension to print the HTML of the element selected: $(‘#div2’). print();

How do I print just a table in HTML?


  1. function printDiv() {
  2. window. frames[“print_frame”]. document. body. innerHTML = document. getElementById(“printableTable”). innerHTML;
  3. window. frames[“print_frame”]. window. focus();
  4. window. frames[“print_frame”]. window. print();
  5. }

How do I print a Web page to PDF?

Chrome for Android and iOS

Step 1: Open your desired webpage in the Chrome app, tap the three-dot icon located in the top-right corner, and tap Share in the drop-down menu. Step 2: A gray pop-up menu appears on the bottom of the screen. From this menu, select Print.

How do I print a PDF file?

How to print to PDF:

  1. Select a file in any application that prints and open it.
  2. Choose “File” > “Print”.
  3. Choose “Adobe PDF” from the list of printers in the print dialog box.
  4. Click “Print” to use the Acrobat PDF printer.
  5. Click “OK” and enter a new file name for your PDF. Save to your desired location.
THIS IS INTERESTING:  You asked: What is the use of DIV and SPAN tag in HTML?

How do I make a webpage a PDF?

How to save a webpage as a PDF

  1. Go to the URL of the webpage you’d like to save as PDF.
  2. Right click anywhere on the page and select ‘Print…’, or use shortcut Ctrl + P .
  3. Once the print dialog box shows up, change the ‘Destination’ to be ‘Save as PDF’. …
  4. Click ‘Save’ then a ‘Save As’ dialog box will appear.
Website creation and design