0
A help using styles
I want to change the color of all header's child tag by using JS and deleting the text-decoration from all links from a ul by using JS too... Any one can tell me how I can do it? I don't want to use css directly(I could, but not)... https://code.sololearn.com/W7XJTxVx6LU9/?ref=app
1 Answer
+ 2
U can use document.querySelectorAll() for CSS selector
example : selecting all child inside div
div > *
for header :
var header = document.querySelectorAll("header")
console.log(header)
header.forEach(header =>{
header.style.color = "green "
})
//}
Do same with anchor