Typography and Rhythm
Create readable type scales, line lengths, spacing, and resilient text behavior.
Good web typography is a system of relationships: font size, line height, line length, weight, and surrounding space. Text must survive narrow screens, long words, translated labels, and user zoom without clipping.
See the core pattern
Read this rule set from the outside in. Identify the inputs, the decision or transformation, and the result before changing it.
.article {
max-inline-size: 68ch;
font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
line-height: 1.75;
overflow-wrap: break-word;
}
.article h2 { margin-block: 2.5em .65em; }Working rules
- Keep prose near 45–75 characters per line
- Use unitless line-height for scalable inheritance
- Avoid fixed heights around text
A common mistake
Centered long-form paragraphs slow scanning; reserve centered text for short, intentional display copy.
Guided practice
Identify the unit that approximates the width of the zero glyph and helps constrain line length.
- Copy the example into the editable notebook below.
- Change one thing at a time and keep the program or rule valid.
- Explain the result in one sentence without relying on jargon.