Readable article mini-project
Definition and purpose
Combine the earlier typography, sizing and color techniques into an article that remains usable on small screens and when readers enlarge text.
Fluid article
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>CSS practice</title> <style> #a { box-sizing: border-box; width: 100%; max-width: 640px; margin-inline: auto; padding: 16px; font-size: 16px; line-height: 1.5; } </style> </head> <body> <article id="a"> <h2>Neighborhood garden</h2> <p> Neighbors share seeds and grow herbs. Everyone can join the weekend planting session. </p> <a id="b" href="#details">Read planting details</a> <p id="details">Bring water and gloves.</p> </article> </body></html>The article fits the narrow viewport and stops growing at 640px.
Syntax and mental model
Give the article a maximum readable measure (for example 65ch), fluid available width, padding inside its border box and a unitless line height. A ch is based on the zero glyph, not an exact character count. Use semantic article markup and recognizable links.
Readable palette and measure
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>CSS practice</title> <style> #a { max-width: 65ch; font-family: sans-serif; line-height: 1.6; font-size: 20px; color: #222; background: white; } #b { color: navy; text-decoration: underline; } </style> </head> <body> <article id="a"> <h2>Neighborhood garden</h2> <p> Neighbors share seeds and grow herbs. Everyone can join the weekend planting session. </p> <a id="b" href="#details">Read planting details</a> <p id="details">Bring water and gloves.</p> </article> </body></html>The content has generous spacing, high-contrast text and a recognizable link.
Common mistakes
Do not fix the article height or hide overflowing prose. A comfortable line length is a guideline rather than a universal number; check the actual language and font.
Practice and next steps
After trying the examples, complete the linked coding exercise and review questions. Predict the result before running your code. Prerequisite: Wrapping, white space and overflow. Next lesson: Background layers and positioning.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Readable article mini-project — knowledge check
Five questions on readable article mini-project.
Why cap article width?
Does 65ch mean exactly 65 characters?
Which helps preserve text after enlargement?
Which should include padding in declared width?
Which link styling keeps a visible cue?