+ 1

Can you help me with js😇🥺

//Make all <li> elements blue(pick your own hexadecimal blue) //Change the background on every paragraph to be yellow //Make all inputs have a 3px red border //Make only inputs with type 'text' have a gray background //Give both <p>'s inside the 3rd <div> a pink background //Give the 2nd <p> inside the 3rd <div> a 5px white border //Make the <em> in the 3rd <div> element white and 20px font(font-size:20px)

12th Apr 2020, 4:10 PM
Улпан Аянбекова
Улпан Аянбекова - avatar
3 Answers
+ 2
1. let liColor= document.getElementsByTagName("li"); for (i = 0; i < liColor.length; i++) { liColor[i].style.color = "blue"; }
14th Apr 2020, 1:38 AM
Mayar Yasser Elabbasy
Mayar Yasser Elabbasy - avatar
+ 2
2. let pColor= document.getElementsByTagName("p"); for (i = 0; i < pColor.length; i++) { pColor[i].style.backgroundColor = "yellow"; }
14th Apr 2020, 1:40 AM
Mayar Yasser Elabbasy
Mayar Yasser Elabbasy - avatar
+ 2
I hope you understand it and I recommend you to study DOM
14th Apr 2020, 1:49 AM
Mayar Yasser Elabbasy
Mayar Yasser Elabbasy - avatar