alternate color css div code example Example: alternate color css table tr:nth-child(odd) td{ ... } table tr:nth-child(even) td{ ... }