const tag = $('#mything').prop('tagName').toLowerCase(); // BETTERIn older jQuery, you needed to use raw DOM:
const tag = $('#mything')[0].tagName.toLowerCase(); console.log('mything is a ' + tag);The [0] converts your query into a DOM object so you can use .tagName. Some browser give it in UPPERCASE so I like to convert it to lower.