+ 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)
3 Answers
+ 2
1.
let liColor=
document.getElementsByTagName("li");
for (i = 0; i < liColor.length; i++) {
liColor[i].style.color = "blue";
}
+ 2
2.
let pColor=
document.getElementsByTagName("p");
for (i = 0; i < pColor.length; i++) {
pColor[i].style.backgroundColor = "yellow";
}
+ 2
I hope you understand it and I recommend you to study DOM



