how to check element is type div tag code example
Example: how to know type of dom element in js
let divElement = document.createElement('div');
if (divElement.nodeName == "DIV") //true
if (divElement.nodeName == "<div>") //false
let divElement = document.createElement('div');
if (divElement.nodeName == "DIV") //true
if (divElement.nodeName == "<div>") //false