TOC PREV NEXT INDEX

Put your logo here!


tagName


tagName returns the name of the element.

Syntax

elementName = element.tagName 

Parameters

elementName is a string containing the name of the current element.

Example

<paragraph id="p001">When I was born...</paragraph> 
 
p = document.getElementById("p001"); 
// p.tagName returns "paragraph" 

Notes

In XML, tagName preserves case. In HTML, tagName returns the element name in the canonical uppercase form. The value of tagName is the same as that of nodeValue.

Specification

core


mozilla.org | mailto:oeschger | bug 93108
TOC PREV NEXT INDEX