Code skill Methods and properties

This piece of code shows you how to use the DOM to change HTML elements after they have been drawn on your screen. The DOM is a set of built-in functions that work with your web browser to make your page dynamic and change according to what the user does. Here the getElementById method is used to find a <div> using it’s id attribute. Then the innerHTML property is used to change the contents of the HTML element.

See the Pen M3 CS Methods and properties by Walker Books UK (@walkerbooks) on CodePen.