This should do it:
var tagName = $("#first")[0].tagName;
[0]is synonymous with get(0). You get the first element from the jQuery object and use the DOM property tagName. This is probably more straight forward in vanilla Javascript:
var tagName = document.getElementById("first").tagName;
source
share