title: How to print HTML content on click of a button, but not the page?
body: <p>I want to print some HTML content, when the user clicks on a button. Once the user clicks on that button, the print dialog of the browser will open, but it will not print the webpage. Instead, it will print the some other HTML content which is not displayed on the page.</p>
  
  <p>While asking this question, there are few solutions coming into my mind. But I am not sure whether those are good ideas or something better can be done. One of those solutions are:
  I can keep this HTML content in a div and make it <code>display:</code> to print, but <code>display: none</code> to screen. All other elements on the webpage can be made to <code>display: none</code> for print and <code>display:</code> for the screen. And then call to print.</p>
  
  <p>Any better idea?</p>