CSS chapters

Chapter 17 of 17

Build and test a study layout

Try this in our CSS Compiler →

The idea

Style a study journal with readable line length, consistent spacing and a layout that works without horizontal scrolling. Prefer a few intentional rules to many overrides. Test keyboard focus, zoom and reduced-motion settings as part of the finished result.

Worked example

body { margin: 0; padding: 16px; font-family: sans-serif; line-height: 1.6; }
main { max-width: 720px; margin: auto; }
a:focus-visible { outline: 3px solid teal; }

What to check

A useful stylesheet supports the document's content. It does not hide labels, force tiny text or substitute decorative effects for readable structure.

Practice task

Style your HTML journal, then test it at 200% zoom. Fix any clipped words or unreachable controls before taking the separate assessment.

Check your understanding

Explain the result in your own words before changing the example. Change one thing at a time, compare the result with your prediction, and keep the version that demonstrates the concept clearly.

Try it yourself

Output
Ctrl/Cmd+Enter runs · Ctrl/Cmd+S downloads the project · Local auto-save is always on