<a id="a1">Click me</a> <script> if (location.hash.slice(1)) { document.getElementById("a1").style.cssText = "color: " + location.hash.slice(1); } </script>
this is alert text and I am cleaver 1hacker and insert my XSS inside text
<a id="a1">Click me</a> <script> if (location.hash.slice(1)) { document.getElementById("a1").style.cssText = "color: " + location.hash.slice(1); } </script>