Sub topic 2
Headlines, Subheads, and Body Text
Assume you know the basic terms typeface, font size, weight, and italic, and that you can read basic HTML and CSS. This chapter focuses on how those choices create a clear reading order.
Headlines: the entry point
A headline is the first textual invitation into a layout. It states the main idea and should be visually dominant without overwhelming the page. Size usually provides the strongest cue. A useful scale keeps each level distinct:
:root {
--body-size: 1rem;
--subhead-size: 1.563rem;
--headline-size: 2.441rem;
}
body {
font-size: var(--body-size);
}
h2 {
font-size: var(--subhead-size);
}
h1 {
font-size: var(--headline-size);
line-height: 1.15;
}Do not choose headline size in isolation. Compare it with body text and subheads. If the headline and subheads are nearly the same size, readers lose the ranking. If the headline is extremely large, it may dominate the content rather than introduce it.
Subheads: structuring and scanning
A subhead divides a long page into meaningful sections. Readers often scan subheads before deciding what to read closely. Make each one specific enough to predict the following content.
Use semantic heading elements in the markup. An h1 identifies the page or article topic. An h2 introduces a major section. The visual design should support this structure rather than replace it.
<article>
<h1>Designing a readable article</h1>
<p>A short introduction establishes the topic.</p>
<h2>Choose a type scale</h2>
<p>A consistent scale keeps levels distinct.</p>
</article>Weight and style as secondary cues
Weight, italic style, and typeface choice can reinforce hierarchy. A bold headline may feel more prominent than a regular one at the same size. Use these cues sparingly. Too many weights or decorative styles create noise and weaken the main signal.
Line height for readable paragraphs
Line height, also called leading, is the vertical space between lines. Body text usually needs more leading than a large headline. A unitless value scales with the font size and commonly works well between 1.4 and 1.7.
body {
font-size: 1rem;
line-height: 1.5;
}
h1 {
line-height: 1.15;
}A hierarchy should remain clear when viewed as a whole:
Exercise
A page has a 1rem body, a 1.1rem subhead, and a 2rem headline. Which change would most clearly improve scanning?
Show answer
Increase the difference between body text and subheads, such as using a larger subhead size or a stronger weight while keeping the headline dominant.