I want to change the color of all elements with
I'm doing:-
document.getElementsByTagName("li").style.color = "red"
This isn't working. But it's working with querySelectorAll method and getElementsByClassName method.
Does it mean that I can't use this technique with getElementsByTagName or am I doing it wrong?