<html>
  <style>
    :root {
      --color: blue;
    }
    .my-text {
      color: var(--color);
    }
  </style>
  <body>
    <div class="my-text">This will be blue</div>
  </body>
</html>

<!-- https://kentcdodds.com/blog/super-simple-start-to-css-variables -->
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.