getElementById
will always return a subtype of Element. In the case of an HTML document, HTMLElement
will be more appropriate
document.getElementById('some-anchor').constructor //HTMLAnchorElement
document.getElementById('some-div').constructor //HTMLDivElement
In all cases, document.getElementById('some-element') instanceof HTMLElement
will, IMHO, return true