I find it odd that when we do element.tagName, all browsers (Chrome / FF / IE / Safari / Opera) consistently return the tag name in uppercase.
Is there actually an official w3c statement that states that user-agents actually had to return the tag name in uppcase?
You’re looking for DOM Level-2:
So
e.tagNameshould always be upper case for HTML but the case will match the source document for XML.