Assuming this is the HTML and the link current goes nowhere, you have to change the href value to a valid URL:
<a href="#" id="mylink" style="color:blue;">My blue link</a>
Notice that I gave it an id, that's for the javascript to turn it to different color and identify this tag.
window.onload = function() {
document.getElementById('mylink').onclick = function() {
this.style.color = 'green';
}
}