Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 9: Understanding the Document Object Model (DOM) with JavaScript!
Instruction
Misusing innerHTML
The content of an element can be changed by assigning a new value to its innerHTML property. If this new value contains an HTML fragment, it creates child nodes within the element. This approach works but is not the intended way to use innerHTML.
const elem = document.getElementById("p1");
elem.innerHTML = "New text in the paragraph.<p>next P</p><p>and even one more P</p>";
...