JSFiddle - React, Tailwind, and code Playground

by masaab algailani

HTML

<div>
    <span>subsequent adjacent</span>
</div>
  <h1>first line</h1>

    <span>Subsequent sibling</span>
    <h1>Second Line</h1>
    <h1>Third Line</h1>

CSS

div + h1{
    background-color:red;
}

span ~ h1{
    background-color:green;
}