Since I've been in the middle of this naming mess recently, based on:
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-June/012089.html

I think that tagName may be safer to use. What I see is that tagName has a fairly specific spec around it, but there's more confusion about localName. It may be sorted out, but I'm not finding anything official about it.