if(element.nodeType == 1){//element of type html-object/tag
if(element.tagName=="a"){
//this is an a-element
}
if(element.tagName=="div"){
//this is a div-element
}
}
Element.prototype.typeof = "element";
var element = document.body; // any dom element
if (element && element.typeof == "element"){
return true;
// this is a dom element
}
else{
return false;
// this isn't a dom element
}
Although the previous answers work perfectly, I will just add another way where the elements can also be classified using the interface they have implemented.