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
Changing HTML Element Content and Attributes
On this page, we show how to change two different things of an HTML element, respectively, a DOM node:
-
Its Content (there is only one - or none)
- Any of Its Attributes (there may be many)
Please take note of the distinction between content and attributes.
General Syntax
<element_name attribute_name="attribute_value">content of the element</element_name>...