JSFiddle - React, Tailwind, and code Playground

HTML

<!-- l'ancre du lien doit correspondre a l'id de l'élément SVG -->
<a href="#monSvg" id="monBouton">Bouton</a>
<svg id="monSvg" width="300px" height="300px" viewBox="0 0 300 300"  version="1.1" xmlns="http://www.w3.org/2000/svg">
<!--un carré rouge-->
<rect id="carre" width="300" height="300" fill="red" />
</svg>

CSS

svg:target #carre {
    fill: yellow;
}