Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Print Stylesheets | CSS Course lesson | BraveProgrammer
  1. Courses
  2. /
  3. CSS Course

Lesson 36 of 50

·css

Print Stylesheets

8 mins

Course progress72%

What you'll learn

Keep these ideas in mind as you work through the lesson.

2 points
  • Hide navigation and interactive elements that make no sense on paper.
  • Add `page-break-after:avoid` to keep headings with their content. * Use `color-adjust:exact` (Safari) to keep colors when needed.

Provide a clean layout for printed pages using @media print.

@media print {
  body { font-size:12pt; line-height:1.4; }
  nav, .no-print { display:none; }
  a::after { content:" (" attr(href) ")"; }
}
Make it stickPractice what you've learned1 quiz · 6 practical tests · Optional activities from CSS CourseBrowse activities
Previous lessonCSS Accessibility – Focus Styles & Reduced MotionContinue to lesson 37CSS for EmailBack to CSS Course curriculum