liveBook · Manning

Line-height property

As explained in Build a Website with ChatGPT

The CSS line-height property specifies the height of a line box and the spacing of text lines.

The CSS line-height property adds breathing room between lines of text. A value such as 1.5 makes each line taller and easier to read. section 6.4 section 7.4.3

Add more space between lines

Put line-height: 1.5; in the body rule of your CSS: body { font-size: 24px; line-height: 1.5; } Adjust the number to change the amount of breathing room while previewing the page. section 6.4

How Build a Website with ChatGPT covers it

How deep it goes
Demonstrates the declaration line-height: 1.5 and adjustment by experimentation, without explaining browser line-box internals.
Examples
Uses body-rule examples containing line-height: 1.5 alongside font size, padding, margins, colors, and maximum width.
What it assumes
Assumes familiarity with locating a CSS body rule and changing declarations, while introducing line spacing through a small example.
What you can do after
Apply it by adding line-height: 1.5 to a CSS body rule and adjusting the value for comfortable text spacing.
How it connects
Connects line-height with CSS, body rules, font size, padding, margins, and rem units.

Also explained in

Compare how 8 books explain line-height property →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Website with ChatGPT. The section links point to the parts of the book it draws on.