Rainbow gradient on text in CSS
<p>What would be the best way to achieve this design in CSS?</p>

<p><a href="https://i.stack.imgur.com/mKoWn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mKoWn.png" alt="enter image description here"></a></p>

<p>and this:
<a href="https://i.stack.imgur.com/SsqW8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SsqW8.png" alt="enter image description here"></a></p>

<p>Thanks for your help!</p>