<div class="group">
  <span class="group-hover:text-yellow-500 text-black">Hello</span>
  <span class="group-hover:text-red-500 text-black">World</span>
</div>
body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height:100vh;
}

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.14/tailwind.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.