Answers.Body: <p>You can use the following CSS rules to style respectively even or odd table rows (<a href="http://www.w3schools.com/Css/tryit.asp?filename=trycss_table_striped" rel="noreferrer">See the Example on W3schools</a>):</p>
  
  <pre><code>tr:nth-child(even) {
      background-color: #f2f2f2
  }
  </code></pre>
  
  <hr>
  
  <pre><code>tr:nth-child(odd) {
      background-color: #f2f2f2
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-13T11:06:15.767Z
Answers.LastActivityDate: 2017-02-13T11:06:15.767Z
Answers.UserDisplayName: Sekhemty
Answers.Body: <p>In HTML just set the fill colours on each row to alternating values some authoring software probably has a table style that does this for you but off the top of my head I can't say which. MS-Word used to author HTML can do this but will probably do it the most verbose way possible, i.e. by having it set on every cell.</p>
  
  <p>You could also do it with 2 styles applied to alternating rows.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-13T07:43:12.793Z
Answers.LastActivityDate: 2017-02-13T07:43:12.793Z
Answers.UserDisplayName: Steve Barnes
Body: <p>Can anyone tell me how to create tables with alternating row colors in an epub? For example, I might want the default background color to be white, but every other row would have a light blue background.</p>
  
  <p>Is there a good way to do that using a basic epub software program like Sigil, or by hand coding the HTML?</p>
  
Tags: <epub><html><editing><css>
Title: How to alternate row colors of tables in ePub files
UserDisplayName: WordBear
ThreadText: # How to alternate row colors of tables in ePub files
  
  (Asked by: username_0 on 2017-02-13)
  
  Can anyone tell me how to create tables with alternating row colors in an epub? For example, I might want the default background color to be white, but every other row would have a light blue background.
  
  Is there a good way to do that using a basic epub software program like Sigil, or by hand coding the HTML?
  
  **Tags:** epub, html, editing, css
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-02-13. Score: 4 | Accepted answer
  
  You can use the following CSS rules to style respectively even or odd table rows (See the Example on W3schools):
  tr:nth-child(even) {
      background-color: #f2f2f2
  }
  
  
  tr:nth-child(odd) {
      background-color: #f2f2f2
  }
  
  
  ---
  
  ### Answer by username_2 on 2017-02-13. Score: 1
  
  In HTML just set the fill colours on each row to alternating values some authoring software probably has a table style that does this for you but off the top of my head I can't say which. MS-Word used to author HTML can do this but will probably do it the most verbose way possible, i.e. by having it set on every cell.
  
  You could also do it with 2 styles applied to alternating rows.
  
  
  ---
  
  