element: ## Example
Hello World!
Hello World!
document.getElementById("p2").style.color="blue"; document.getElementById("p2").style.fontFamily="Arial"; document.getElementById("p2").style.fontSize="larger";The paragraphs above were modified by script.
[Try it Β»](#) * * * ## Using Events HTML DOM allows us to execute code by triggering events. For example, the following events: * An element is clicked. * The page has finished loading. * An input field has been modified. * ... In the following chapters, you will learn more about events. This example changes the style of the HTML element with id="id1" when the user clicks the button: ## Example
YouTip