Paragraph indents and spacing

The same two paragraphs six ways: the indents, the room around a paragraph, its last line, its first line.

The shape of a paragraph is four or five numbers, and this page shows what each of them does by setting the same two paragraphs six times over: a first-line indent, a hanging indent, a margin on the left and on the right, the room above and below the paragraph, and what happens to the last line of a justified block.

The sixth block is about the first baseline — the line the text sits on: how far below the top of its box the first line of a paragraph comes to rest. Get that wrong and every block on a page is a point or two out of line with its neighbours, which is the sort of defect nobody sees and everybody feels.

What this example shows

  • First-line and hanging indents, and a margin on each side.
  • Space before and after a paragraph, stated in points.
  • The last line of a justified paragraph, and the first baseline.

The code, in full

The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.

The document itself

The same document is written in each of these languages. Open the one you want to look at.

Open the document in English Open the document in French

Read the Rust source Read the Python source

First page of Paragraph indents and spacing

What this document weighs

Before 109,754 bytes
Now 39,188 bytes
Saved 64.3 %

Not one mark on the page changed. See every document measured.

Examples near this one

Soft hyphens and no-break spaces

A justified column set twice: the long words breaking at their soft hyphens with a hyphen shown, or left whole, and a figure a no-break space keeps together.

Break points after a slash or a hyphen

A justified column set twice: file paths and compounds running past the edge with no break points, then wrapping where a break after a slash or a hyphen is allowed.

Text poured into columns

One long passage poured into three columns, each fitting the lines its height allows and handing the rest to the next.

Every example, by subject