The CSS Text Gradient Technique
The text gradient technique works by applying a gradient as the element's background, then clipping the background to only be visible through the text. The key properties are background: linear-gradient(...), -webkit-background-clip: text, background-clip: text, and color: transparent.
Best Practices for Gradient Text
Use gradient text for headings and hero text, not body copy β it's an accent effect that loses impact when overused. Bold weights (600-900) show the gradient better than regular or light weights. Larger font sizes (32px+) give the gradient room to transition smoothly.
Real-World Examples
Major websites use gradient text for impact: Apple uses it for product headlines, Stripe uses it for feature announcements, and countless landing pages use it for hero sections. Always set a solid color property as a fallback before the gradient code.