Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

You use @media rules in your CSS style sheets to define which html tags you want to print and which are only visible on screen. E.g. @media print { .stuff-you-don't-want-to-print { dis...

posted 5y ago by System‭  ·  last activity 5y ago by System‭

Answer
#3: Attribution notice added by user avatar System‭ · 2019-12-08T11:39:44Z (about 5 years ago)
Source: https://writers.stackexchange.com/a/44451
License name: CC BY-SA 3.0
License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision by user avatar System‭ · 2019-12-08T11:39:44Z (about 5 years ago)
You use `@media` rules in your CSS style sheets to define which html tags you want to print and which are only visible on screen. E.g.

    @media print {
        .stuff-you-don't-want-to-print {
            display: none;
        }
    }

To print the current browser window, you print it with JavaScript, e.g.

    <a href="javascript:window.print()">Print</a>

* * *

The page you link to actually provides a separate web page to print. You can see that the URL of the page you print is different than the URL of the blog post. And if you look at the source code the pages are different. So in fact your "example" is an example of what you _don't_ want, when you say that "[you] don't want to have to create the content twice". That page _has_ created the content twice.

If you don't want to create the content twice, use media queries.

#1: Imported from external source by user avatar System‭ · 2019-04-07T19:48:20Z (over 5 years ago)
Original score: 2