In order to make html page interactive, html document has to be represented in a way so that JavaScript can…