HTMLElement
<a id="anchor" href="http://opentutorials.org">opentutorials</a>
<ul>
<li>HTML</li>
<li>CSS</li>
<li id="list">JavaScript</li>
</ul>
<input type="button" id="button" value="button" />
<script>
var target = document.getElementById('list');
console.log(target.constructor.name); // HTMLLIElement
var target = document.getElementById('anchor');
console.log(target.constructor.name); // HTMLAnchorElement
var target = document.getElementById('button');
console.log(target.constructor.name); // HTMLInputElement
</script>
DOM Tree

Last updated
Was this helpful?