CSS Quickie - Indenting Paragraphs

If you haven’t noticed, I’ve been feeling rather profilic with this blog lately, and have been spewing some extended missives. Because of this, I decided to tweak the way paragraphs are rendered, to better suit the volume of the text. I increased the space between paragraphs and justified the text, for starters. But, I also wanted to add a typesetting nicety that seems to have been lost when text moved from physical books to the World Wide Web - indenting the first line of a paragraph.

I recall commenting about this loss to someone a while ago but, at the time, didn’t actually investigate what it would take to bring it back. Surely, it must be difficult, since you hardly ever see it in use. CNN? Nope. Zeldman? Nope. Kottke? Nope. Adobe? Nope.

So, what’s the deal? Too hard for mere mortals to implement?

Nope. You just do this:

p + p {text-indent: 1.5em;}

(the “+ p” makes the indent NOT happen on the first paragraph of any group of paragraphs. Your call.)

CSS is funny. You think you’re an expert, and then you discover one line of code that does something you didn’t even think was possible. Thanks go directly to the w3c for this tip.

Leave a Reply