{"course":{"slug":"design-foundations","title":"Design, before Any Software","url":"https://addaly.com/learn/design-foundations","level":"beginner","track":"create"},"lesson":{"slug":"ragged-justified-and-hyphenation","title":"Rivers, rags and where the line breaks","url":"https://addaly.com/learn/design-foundations/ragged-justified-and-hyphenation","position":28,"of":74,"minutes":9,"answer":"Compare start alignment and justification at the real measure. Automatic hyphenation depends on both known language and suitable browser resources.","keyIdea":"Compare start alignment and justification at the real measure. Automatic hyphenation depends on both known language and suitable browser resources."},"body":{"format":"markdown","text":"## Why justified text goes wrong\n\nJustified text reaches both margins. A setting engine adjusts opportunities such as spaces between words, or other spacing depending on the script and method, so the line fits the measure. This example uses Latin word gaps.\n\nImagine a 70-character line with twelve words and eleven spaces, and a 35-character line with five words and four spaces. If both lines needed the same total extra width and each gap received an equal share, a gap on the short line would receive 11 ÷ 4 = 2.75 times the amount. Real lines can need different adjustments and have different gap counts.\n\nWhen several consecutive lines have wide spaces in nearby positions, they connect into a pale channel running down the paragraph. These are **rivers**, and once you have seen one you will see them everywhere. They are distracting in a specific way: they compete with the horizontal reading motion by offering a vertical path.\n\nChoose alignment after seeing the actual paragraph, at the widths and text settings readers will use.\n\n> For narrow Latin body text, start at the reading edge and leave the far edge ragged. If you try justification, compare gaps and line breaks with suitable hyphenation. WCAG 2.2 Level AAA Visual Presentation separately asks for a way to achieve un-justified blocks of text.\n\n## Hyphenation is the missing half\n\nHyphenation can give the engine an extra line-break opportunity. It can reduce the extra space needed on a line by fitting a part of a word before the break. Compare the setting with and without it, paying attention to both gaps and repeated hyphens.\n\nThe web example requests automatic hyphenation and identifies the language. Try both settings with representative words in your target browsers.\n\n> Figure: Alignment choices at two measures. A two by two grid, rows Wide Latin example and Narrow Latin example, columns Justified and Ragged end: Wide Latin example and Justified: Test; Wide Latin example and Ragged end: Compare; Narrow Latin example and Justified: Check gaps; Narrow Latin example and Ragged end: Start here. With equal total adjustment and equal shares, a four-gap line receives 11 ÷ 4 = 2.75 times the share per gap of an eleven-gap line. Real lines vary.\n\n```css\np { hyphens: auto; }\n```\n\n```html\n<html lang=\"en-GB\">\n```\n\nAutomatic hyphenation requires a known language and a suitable hyphenation resource in the browser. A correct `lang` value makes the language available. Check whether the browser actually supports automatic breaks for it and whether the line needs a break. [W3C CSS Text hyphenation](https://www.w3.org/TR/css-text-3/#hyphenation).\n\n## Ragged is usually right\n\nStart alignment puts the even edge at the reading start and leaves the other edge ragged. Left-to-right Latin prose then has a ragged right edge. Right-to-left prose has a ragged left edge. Compare the real spacing and breaks after choosing alignment.\n\nA good rag has a shape. What to look for:\n\n- **Watch for an unusually short line.** Read the phrase across the break to see whether it still makes sense.\n- **Watch for an accidental shape.** A repeated wedge or staircase can catch the eye.\n- **Watch repeated endings.** A stack of identical words or hyphens may draw attention.\n\nYou adjust a rag by changing the measure slightly, by inserting a non-breaking space to force two words to stay together, or by rewriting. In long web text you cannot control it, which is fine: this is a fine-typography concern for headlines, pull quotes and print, not for flowing body text that reflows on every device.\n\n## Headlines are where line breaks matter most\n\nA headline that breaks badly changes the sentence. Consider:\n\n```\nThe committee rejected the plan to\nclose the library\n```\n\nagainst\n\n```\nThe committee rejected the plan\nto close the library\n```\n\nThe second breaks at a phrase boundary and reads in one pass. CSS now has a declaration for this:\n\n```css\nh1, h2 { text-wrap: balance; }\np { text-wrap: pretty; }\n```\n\n`balance` aims for more even lines and can help a short headline. `pretty` lets the browser spend extra effort choosing better wraps in a block. Exact algorithms and line-count limits vary. Check the actual phrase breaks and the fallback on your target browsers. [W3C CSS Text wrapping](https://www.w3.org/TR/css-text-4/#text-wrap-style).\n\n## Widows and orphans\n\nTwo terms that get swapped constantly. The conventional definitions:\n\n- An **orphan** is the first line of a paragraph left alone at the bottom of a column or page.\n- A **widow** is the last line of a paragraph left alone at the top of the next one.\n\nA single word alone on the last line of a paragraph is also commonly called a widow, or a runt. All three are worth avoiding because they look like a mistake in the production rather than a property of the text.\n\nIn CSS, `orphans` and `widows` take effect only in paged contexts (printing and multi-column layouts) and do nothing in ordinary continuous flow. In Scribus, LibreOffice Writer and any word processor, the equivalent setting lives in the paragraph controls and does work. This is a case where print tools are better equipped than the browser, and it is worth knowing which environment you are in before you promise anybody a fix.\n\n## Align prose to support the next line\n\nA short invitation or title can suit centring. For a longer paragraph, compare a shared start edge, especially at phone widths and enlarged text. A consistent start gives the reader a predictable place to return to."},"check":{"question":"A paragraph declares automatic hyphenation, but long words never break in one language. Which check addresses the feature directly?","options":[{"text":"Check whether the font can switch from proportional to tabular digits.","correct":false,"tempting":"Numeric width features are separate from word breaks."},{"text":"Try a larger line height and keep all language settings the same.","correct":false,"tempting":"Line height changes vertical spacing. It does not supply a word-break resource."},{"text":"Check the text's language and the browser's hyphenation resources for it.","correct":true},{"text":"Change every paragraph to justified alignment before checking anything else.","correct":false,"tempting":"Automatic hyphenation can also work in start-aligned text."}]},"prev":{"slug":"pairing-without-guessing","title":"Two typefaces, and why you probably want one","url":"https://addaly.com/learn/design-foundations/pairing-without-guessing"},"next":{"slug":"tracking-kerning-and-optical-size","title":"Letter spacing, and the sizes type was drawn for","url":"https://addaly.com/learn/design-foundations/tracking-kerning-and-optical-size"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Rivers, rags and where the line breaks', in Design, before Any Software. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/design-foundations/ragged-justified-and-hyphenation (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Rivers, rags and where the line breaks","courseTitle":"Design, before Any Software","module":{"index":3,"slug":"type-mechanically","title":"Type, mechanically"},"answer":null,"keyIdea":"Compare start alignment and justification at the real measure. Automatic hyphenation depends on both known language and suitable browser resources.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"matrix","title":"Alignment choices at two measures","rows":["Wide Latin example","Narrow Latin example"],"cols":["Justified","Ragged end"],"cells":[["Test","Compare"],["Check gaps","Start here"]],"cellLabels":[["suitable hyphenation","spacing to compare"],["few gaps in example","natural word spacing"]],"caption":"With equal total adjustment and equal shares, a four-gap line receives 11 ÷ 4 = 2.75 times the share per gap of an eleven-gap line. Real lines vary."},"alt":"Figure: Alignment choices at two measures. A two by two grid, rows Wide Latin example and Narrow Latin example, columns Justified and Ragged end: Wide Latin example and Justified: Test; Wide Latin example and Ragged end: Compare; Narrow Latin example and Justified: Check gaps; Narrow Latin example and Ragged end: Start here. With equal total adjustment and equal shares, a four-gap line receives 11 ÷ 4 = 2.75 times the share per gap of an eleven-gap line. Real lines vary."}},"blocks":[{"t":"h2","id":"why-justified-text-goes-wrong","runs":[{"text":"Why justified text goes wrong"}]},{"t":"p","runs":[{"text":"Justified text reaches both margins. A setting engine adjusts opportunities such as spaces between words, or other spacing depending on the script and method, so the line fits the measure. This example uses Latin word gaps."}]},{"t":"p","runs":[{"text":"Imagine a 70-character line with twelve words and eleven spaces, and a 35-character line with five words and four spaces. If both lines needed the same total extra width and each gap received an equal share, a gap on the short line would receive 11 ÷ 4 = 2.75 times the amount. Real lines can need different adjustments and have different gap counts."}]},{"t":"p","runs":[{"text":"When several consecutive lines have wide spaces in nearby positions, they connect into a pale channel running down the paragraph. These are "},{"text":"rivers","b":true},{"text":", and once you have seen one you will see them everywhere. They are distracting in a specific way: they compete with the horizontal reading motion by offering a vertical path."}]},{"t":"p","runs":[{"text":"Choose alignment after seeing the actual paragraph, at the widths and text settings readers will use."}]},{"t":"quote","runs":[{"text":"For narrow Latin body text, start at the reading edge and leave the far edge ragged. If you try justification, compare gaps and line breaks with suitable hyphenation. WCAG 2.2 Level AAA Visual Presentation separately asks for a way to achieve un-justified blocks of text."}]},{"t":"h2","id":"hyphenation-is-the-missing-half","runs":[{"text":"Hyphenation is the missing half"}]},{"t":"p","runs":[{"text":"Hyphenation can give the engine an extra line-break opportunity. It can reduce the extra space needed on a line by fitting a part of a word before the break. Compare the setting with and without it, paying attention to both gaps and repeated hyphens."}]},{"t":"p","runs":[{"text":"The web example requests automatic hyphenation and identifies the language. Try both settings with representative words in your target browsers."}]},{"t":"code","lang":"css","label":"CSS","text":"p { hyphens: auto; }"},{"t":"code","lang":"html","label":"HTML","text":"<html lang=\"en-GB\">"},{"t":"p","runs":[{"text":"Automatic hyphenation requires a known language and a suitable hyphenation resource in the browser. A correct "},{"text":"lang","code":true},{"text":" value makes the language available. Check whether the browser actually supports automatic breaks for it and whether the line needs a break. "},{"text":"W3C CSS Text hyphenation","href":"https://www.w3.org/TR/css-text-3/#hyphenation"},{"text":"."}]},{"t":"h2","id":"ragged-is-usually-right","runs":[{"text":"Ragged is usually right"}]},{"t":"p","runs":[{"text":"Start alignment puts the even edge at the reading start and leaves the other edge ragged. Left-to-right Latin prose then has a ragged right edge. Right-to-left prose has a ragged left edge. Compare the real spacing and breaks after choosing alignment."}]},{"t":"p","runs":[{"text":"A good rag has a shape. What to look for:"}]},{"t":"ul","items":[[{"text":"Watch for an unusually short line.","b":true},{"text":" Read the phrase across the break to see whether it still makes sense."}],[{"text":"Watch for an accidental shape.","b":true},{"text":" A repeated wedge or staircase can catch the eye."}],[{"text":"Watch repeated endings.","b":true},{"text":" A stack of identical words or hyphens may draw attention."}]]},{"t":"p","runs":[{"text":"You adjust a rag by changing the measure slightly, by inserting a non-breaking space to force two words to stay together, or by rewriting. In long web text you cannot control it, which is fine: this is a fine-typography concern for headlines, pull quotes and print, not for flowing body text that reflows on every device."}]},{"t":"h2","id":"headlines-are-where-line-breaks-matter-most","runs":[{"text":"Headlines are where line breaks matter most"}]},{"t":"p","runs":[{"text":"A headline that breaks badly changes the sentence. Consider:"}]},{"t":"code","lang":"","label":"Text","text":"The committee rejected the plan to\nclose the library"},{"t":"p","runs":[{"text":"against"}]},{"t":"code","lang":"","label":"Text","text":"The committee rejected the plan\nto close the library"},{"t":"p","runs":[{"text":"The second breaks at a phrase boundary and reads in one pass. CSS now has a declaration for this:"}]},{"t":"code","lang":"css","label":"CSS","text":"h1, h2 { text-wrap: balance; }\np { text-wrap: pretty; }"},{"t":"p","runs":[{"text":"balance","code":true},{"text":" aims for more even lines and can help a short headline. "},{"text":"pretty","code":true},{"text":" lets the browser spend extra effort choosing better wraps in a block. Exact algorithms and line-count limits vary. Check the actual phrase breaks and the fallback on your target browsers. "},{"text":"W3C CSS Text wrapping","href":"https://www.w3.org/TR/css-text-4/#text-wrap-style"},{"text":"."}]},{"t":"h2","id":"widows-and-orphans","runs":[{"text":"Widows and orphans"}]},{"t":"p","runs":[{"text":"Two terms that get swapped constantly. The conventional definitions:"}]},{"t":"ul","items":[[{"text":"An "},{"text":"orphan","b":true},{"text":" is the first line of a paragraph left alone at the bottom of a column or page."}],[{"text":"A "},{"text":"widow","b":true},{"text":" is the last line of a paragraph left alone at the top of the next one."}]]},{"t":"p","runs":[{"text":"A single word alone on the last line of a paragraph is also commonly called a widow, or a runt. All three are worth avoiding because they look like a mistake in the production rather than a property of the text."}]},{"t":"p","runs":[{"text":"In CSS, "},{"text":"orphans","code":true},{"text":" and "},{"text":"widows","code":true},{"text":" take effect only in paged contexts (printing and multi-column layouts) and do nothing in ordinary continuous flow. In Scribus, LibreOffice Writer and any word processor, the equivalent setting lives in the paragraph controls and does work. This is a case where print tools are better equipped than the browser, and it is worth knowing which environment you are in before you promise anybody a fix."}]},{"t":"h2","id":"align-prose-to-support-the-next-line","runs":[{"text":"Align prose to support the next line"}]},{"t":"p","runs":[{"text":"A short invitation or title can suit centring. For a longer paragraph, compare a shared start edge, especially at phone widths and enlarged text. A consistent start gives the reader a predictable place to return to."}]}],"check":{"question":[{"text":"A paragraph declares automatic hyphenation, but long words never break in one language. Which check addresses the feature directly?"}],"options":[{"text":[{"text":"Check whether the font can switch from proportional to tabular digits."}],"correct":false,"tempting":[{"text":"Numeric width features are separate from word breaks."}]},{"text":[{"text":"Try a larger line height and keep all language settings the same."}],"correct":false,"tempting":[{"text":"Line height changes vertical spacing. It does not supply a word-break resource."}]},{"text":[{"text":"Check the text’s language and the browser’s hyphenation resources for it."}],"correct":true,"tempting":null},{"text":[{"text":"Change every paragraph to justified alignment before checking anything else."}],"correct":false,"tempting":[{"text":"Automatic hyphenation can also work in start-aligned text."}]}],"order":[0,3,2,1],"why":null},"prev":{"slug":"pairing-without-guessing","title":"Two typefaces, and why you probably want one","minutes":8},"next":{"slug":"tracking-kerning-and-optical-size","title":"Letter spacing, and the sizes type was drawn for","minutes":8}}}