Applying a gradient color to a title with CSS.

To apply a gradient color to a title using CSS, you can use the following method:

<h1 class="title">Gradient Title</h1>

.title {  
  background-image: linear-gradient(to right, #color1, #color2);  
  background-clip: text;  
  color: transparent;  
}

Applying a gradient color to a title with CSS.