Adding Indents

You can determine how much space should precede the first line of a paragraph.

Figure 10.29. I added a 1.5 em indent to the p elements (which, since their font size is about 14 pixels, will be an indent of about 21 pixels).

To add indents:

Type text-indent: length, where length is a number with units, as in 1.5em or 18px.

✓ Tips

  • A positive value creates a typical paragraph indent and serves as a visual clue as to where new paragraphs begin.

  • A negative value creates a hanging indent. You may need to increase the padding (see page 177) or margins (see page 176) around a text box with a hanging indent in order to accommodate the ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.