I'm hand formatting an ebook with Sigil for distribution through Amazon. I've noticed that, while it's most common to place your Text-indent in the CSS of the <p> tag, it also works in the <body> tag.

The reason I'm asking is that I've noticed that an epub listing Text-intent in the <body> properties was the first and only ebook that ever displayed indented paragraphs in my default desktop ebook reader, SumatraPDF. I'm sure that's a bug in the application, but it got me wondering if listing my Text-indent under <body> in the CSS Stylesheet even just as a backup to the <p> styling might be useful.


If you set properties for <body>, it will affect even elements like headers (<h1>...<h6>), lists (<ul>, <li>), and everything else, not just regular paragraphs (<p>).

This could be what you want to achieve, but in the most common scenarios, I think that it is better to style every element on its own. In example, text indent is not something that you usually want to see on titles/headers.

Applying styles to <body> is useful in all those cases where you want or need to apply some property to all of your text, in example to set the default font for your book, or to set the minimum margins of the text blocks from the ereader screen border, and so on.

  • Thanks. The book I saw the ebook I first saw this bit of CSS in was a super simple short story. It didn't have any headings aside from the title, so I hadn't considered what that CSS might do to a more complex document. Thanks. – PipedreamerGrey Jun 2 '17 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.