JSFiddle - React, Tailwind, and code Playground

HTML

<dl>
        <dt>green foo</dt>
        <dd>green bar</dd>
        <dt>red foo</dt>
        <dd>red bar</dd>
        <dt>green foo</dt>
        <dd>green bar</dd>
    </dl>

CSS

dl { color: blue }
dd:nth-of-type(even) {color: red;}
dt:nth-of-type(even) {color: red;}
dd:nth-of-type(odd) {color: green;}
dt:nth-of-type(odd) {color: green;}