Answers.Body: <p>If you set properties for <code>&lt;body&gt;</code>, it will affect even elements like headers (<code>&lt;h1&gt;</code>...<code>&lt;h6&gt;</code>), lists (<code>&lt;ul&gt;</code>, <code>&lt;li&gt;</code>), and everything else, not just regular paragraphs (<code>&lt;p&gt;</code>).</p>
  
  <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.</p>
  
  <p>Applying styles to <code>&lt;body&gt;</code> 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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-02T00:57:37.007Z
Answers.Text: 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.
Answers.UserDisplayName: PipedreamerGrey
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-01T11:57:35.870Z
Answers.LastActivityDate: 2017-06-02T08:30:41.237Z
Answers.LastEditDate: 2017-06-02T08:30:41.237Z
Answers.UserDisplayName: Sekhemty
Body: <p>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 <code>&lt;p&gt;</code> tag, it also works in the <code>&lt;body&gt;</code> tag.  </p>
  
  <p>The reason I'm asking is that I've noticed that an epub listing Text-intent in the <code>&lt;body&gt;</code> 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 <code>&lt;body&gt;</code> in the CSS Stylesheet even just as a backup to the <code>&lt;p&gt;</code> styling might be useful.</p>
  
Tags: <epub><css>
Title: Is it more effective to apply CSS styles to <p> or <body> elements in an ePub?
UserDisplayName: PipedreamerGrey
ThreadText: # Is it more effective to apply CSS styles to <p> or <body> elements in an ePub?
  
  (Asked by: username_0 on 2017-05-31)
  
  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.
  
  **Tags:** epub, css
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-01. Score: 2 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  