HTML (ASP): Can I suppress text except for printing?

I just got a strange request at work. My boss wants three fields on an online form, for signature, date, and time. These are going to be filled in with a pen on the printout. But I don’t want them to show up on people’s monitors.

Is there any way to do that? FWIW, the page has a background image, and some printers are black and white and others a color.

Make them invisible, and then create a separate stylesheet for printing (media=“print”) in which they are visible.

This relies on the browser supporting stylesheets for print, of course, but I’m pretty sure all reasonable configurations do.

I’m not an HTML guy, but you should be able to do it with a print style sheet. It involves setting the media of your style.

Here’s a good resource with an answer:

I’ll try that out, thanks!

Looks like you have some solid answers already.

Yes, everything centers on using {display:none;} for the main style sheet to hide the elements, and then a standard display style definition on the print style sheet. I use the reverse of that for elements that shouldn’t show up on the printed version (e.g., navigation elements).