You can read a more technical description and additional information about the DOM on the Mozilla Developer Network.
- Returns an object reference to the identified element.
What do I mean target by ID?
If your not familiar with an ID it is simply giving a element on a page a specific name. For example, a normal h1 tag would look like this.
<h1>This is a Title</h1>
We can assign an id to it by giving it a name, like this.
<h1 id="mainTitle">This is a Title</h1>
var headline = document.getElementById("mainHeading"); headline.innerHTML = "Wow, a New H1 Heading!";
Or, download the full code files from GitHub to practice with your own text editor.