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

Accessing Content

If you want to get access to the content of a node, you can use different properties of different classes: Node.textContent, HTMLElement.innerText, or Element.innerHTML. However, they are not equal; please consider the differences. To keep our examples clear and easy, we use Element.innerHTML whenever possible because it is very close to the HTML source code.

const exampleContent = do...