As you can see, I have an ID attribute on my div entitled, ‘myDiv’. We can put IDs on virtually any HTML tag. The only real rule is that each ID needs to be unique on a page. In other words, I cannot have two ‘myDiv’ IDs on the same HTML page.
// Create variable to hold myDiv div
// Grab myDiv and put it into myVar
myVar = document.getElementById("myDiv");