I try to highlight all nofollow links in the webpage by bookmark a code, but it's not working Can someone tell me what I am doing wrong, here is my code:
javascript:var a = document.getElementsByTagName('a');for(var i=0; i<a.length; i++)if (a[i].rel === 'nofollow') {a[i].style.backgroundColor = 'red';a[i].style.fontSize = '2em';}
I expect to highlight every nofollow link in the page
You forgot to add the opening curly brace after the
forloop definition. Working code: