0

Elements in DOM

I’m having problems with this question! Can anyone help? Fill in the blanks to change the background colour of all span elements of the page. var s = document. Get ElementsByTagName (“****”); ***(var x=0; x<s.length;x++) { s[*].style.backgroundColor = “#33EA73”; } The first part I don’t get ****, a four letter entry? Can anyone help?

13th Jan 2019, 10:59 AM
Brent Malcolm
5 Answers
+ 1
thanks
13th Jan 2019, 11:06 AM
Brent Malcolm
+ 1
I think it should be "span" (you have to change background color of span elements), "for", "x".
13th Jan 2019, 11:08 AM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
The answer is "span". It will return an array with all the span elements in the page.
13th Jan 2019, 11:06 AM
giannismach
giannismach - avatar
0
Brent Malcolm You 're welcome!
13th Jan 2019, 11:07 AM
giannismach
giannismach - avatar
0
yes it is, i answered it correctly a couple of days ago, but the module came up as unanswered the next day, and being so busy, i didnt take notes!
13th Jan 2019, 11:09 AM
Brent Malcolm