CSS - Alternating TR colors

HTML

<table>
    <tr>
    <td>hello world</td>
    </tr>
    <tr>
    <td>this is what I mean</td>
    </tr>
    <tr>
    <td>though some people may not like</td>
    </tr>
    <tr>
    <td>I just picked colors from their branding page</td>
    </tr>
    <tr>
    <td>obviously a designer can do this better</td>
    </tr>
</table>

CSS

tr:nth-child(odd){ background-color:#2C2F33; }
tr:nth-child(even){ background-color:#99AAB5; }
body { background-color: #23272A; color: white; }