How do I create gradient text in CSS?
Use background-clip: text with -webkit-background-clip: text. Apply a gradient to the background, then clip it to the text shape. Set color: transparent so the gradient shows through.
Full example: background: linear-gradient(to right, red, blue); -webkit-background-clip: text; background-clip: text; color: transparent;. The gradient becomes your text fill.
Browser support is solid—Chrome, Firefox, Safari, Edge all handle it.
Keep the -webkit- prefix for wider compatibility.