title: Hide when page load show when print
body: <p>What specific css code that will hide the item when the page load and later show it when printing? I use <code>window.print</code> function for print the html page. I only got the function to hide something when printing page. </p>
  
  <pre><code>&lt;style type="text/css" media="print"&gt;
  #dontprint { 
     display: none; 
  }
  &lt;/style&gt;
  
  
  &lt;a href="#"  id="dontprint" onclick="myFunction()" &gt; Print &lt;/a&gt;
  </code></pre>