Uppercase element.tagName for HTML elements only

Fixes #3146
Merge pull request #3147 from mbrubeck/tagname-upper

Uppercase element.tagName for HTML elements only r=Ms2ger