Technically, this is mandated in DOM Level 1:
The HTML DOM returns the tagName
of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.
The convention of uppercase tag names probably stems from legacy, when HTML was previously developed based on SGML, and element types were declared in uppercase. See this section of the HTML 4.01 spec discussing SGML, HTML and its syntax, as well as for example the HTML 4.01 Strict doctype definition. Any DOM implementations supporting HTML would follow suit.
Note that lowercase tag names are only explicitly required in XHTML (but not XML), and authors are generally recommended to write lowercase tags for easy porting between HTML/XHTML, as well as improving readability. However, this recommendation doesn't occur in the spec; all it says is that tag names are case-insensitive only in HTML as opposed to XHTML and XML.
xhtml
is the standard that requires tags to be lowercase, however this doesn't make difference I believe. – Woolsack