Programmer's Guide > Interfaces > W3C Element interface > tagName attribute
  
tagName attribute
The name of the element. For example, in:

<elementExample id="demo">
...
</elementExample> ,
tagName has the value "elementExample". Note that this is case-preserving in XML, as are all of the operations of the DOM. The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.
tagName
Access
read-only
Returns
String