<div class="parent">
  <div class="child">Hello CSS Variables</div>
</div>
.parent {
  --my-color: red;
}

.child {
  color: var(--my-color);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.