This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

tagName

Property of dom/HTMLElementdom/HTMLElement

Syntax

var result = element.tagName;
element.tagName = value;

Examples

This example retrieves the tag name of an object that has the identifier specified in the prompt window.

<SCRIPT>
var idValue = window.prompt("Get the tag with this ID:");
if (idValue != null) {
    alert(document.all[idValue].tagName)
}
</SCRIPT>

Syntax

Standards information

Attributions