Use a printer stylesheet to reformat content for printing

You can use a printer stylehsheet, or add printing styles, to format your web page for printing. For example set black text on a white background, remove menus, add copyright details. This example hides the element (for example a <div>) that has the ID "mainMenuBar".

@media print
{
#mainMenuBar
{
  display: none;
}
}

This example defines a css class that can be used to print a copyright notice that is not displayed on the screen.

@media screen
{
.printerOnly
{
  display: none !important;
}
}

Try it out; print out this page and spot the differences.