Create in the SVG namespace.createElementNS builds a real SVG element.
Local name is "circle". That is the part after any prefix in a qualified name.
Namespace is separate.namespaceURI tells you which vocabulary it belongs to.
MDN idea. For svg:circle, the local name is still "circle".
Compatibility
Browser Support
Element.localName is Baseline Widely available (MDN: since July 2015). Safe across modern and older evergreen browsers.
✓ Baseline · Widely available
Element.localName
Read-only local part of the element's qualified name — lowercase for HTML in HTML DOMs.
99%Widely available
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
localNameExcellent
Bottom line: Safe for production. Prefer localName for case-stable HTML tag checks.
Frequently Asked Questions
The local part of the element's qualified name as a string. For HTML elements in an HTML document, that is usually the lowercase tag name (for example "div").
No. MDN marks Element.localName as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
In HTML documents, tagName is uppercase for HTML elements ("DIV"), while localName is lowercase ("div"). localName is also the part after the colon in a namespaced qualified name.
The local name is the part after the colon. For svg:circle, localName is "circle". Use prefix and namespaceURI for the namespace parts.
Yes. You read it to inspect the element name. You cannot assign to localName to rename an element.
Use localName for case-stable comparisons in HTML, or when working with SVG/XML where the local part of a qualified name matters.