Learn / Break / Fix Lab

A longer heading.
A broken layout.

Break it. Understand it. Fix it.

Exercise 01 · About 3 minutes

  1. 1Break it
  2. 2Try a fix
  3. 3Take it with you

01 / Stress the content

Heading length
Preview width

Start with the long heading. Can the card keep all its words inside without making the text smaller?

02 / Choose a fix

Try a solution. Watch what changes.

Live preview

320 px

Web development

Build better.

Practical lessons for your next project.

Explore lessons
Ready for a longer heading?

The short title fits. Select Long heading to test the same layout with more content.

Narrow: not checked Wide: not checked

03 / Why this happens

This example deliberately uses white-space: nowrap. It prevents normal line breaks. A short title hides the problem; longer content reveals it.

Headings normally wrap. The problem here is the added CSS rule, not the heading element itself.

Current CSS · the starting point

.card__heading {
  font-size: 2rem;
  white-space: nowrap;
}