JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>

</ul>

<ul>
    <li>a</li>
    <li>b</li>
</ul>

CSS

ul li {
    background-color: silver;
}

ul li:nth-child(1){
    background-color: cyan;
}

ul li:nth-child(4){
    background-color: red;
}

ul li:nth-child(5){
    background-color: yellow;
}