How can you access HTML elements with JavaScript? You use the DOM or Document Object Model which gives you access to the HTML document by way of the document object.…