HTMLElement.tagName
const element = document.getElementById('myImgElement');
console.log('Tag name: ' + element.tagName);
// Tag name: IMG
<img src="http://placekitten.com/200/200" id="myImgElement" alt="">
NOTE: It returns tags in capitals. E.g. <img /> will return IMG.