Print Styles — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the Print Styles lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Keep a block together
easy10 minStop #wrap being split across pages.
- 2
Start a new page
easy10 minForce a page break after #wrap.
- 3
Keep the backgrounds
easy10 minTell the printer to honour #wrap's colours exactly.
- 4
Avoid stranded lines
easy10 minRequire at least 3 lines of #text on each page.
- 5
Build a print-friendly block
medium10 minUnbroken, colour-accurate, with no stranded lines.
Find the bug(5)
- 1
Fix the invalid value
easy8 minThe value is avoid.
- 2
Fix the wrong break value
easy8 minStarting a new page uses the value page.
- 3
Fix the misspelled property
easy8 minThe property is print-color-adjust.
- 4
Fix the value with a unit
easy8 minorphans and widows count lines, so they are unitless.
- 5
Fix the break on the wrong axis
easy8 minThis should stop the block splitting, not force a break before it.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace