Описание тега createelement

NoneCreate Element is a Web API that creates creates the specified HTML element in HTML,In a XUL document creates the specified XUL element,In other documents it creates an element with a null namespaceURI.

Description

  • In an HTML document creates the specified HTML element
  • In a XUL document creates the specified XUL element.
  • In other documents creates an element with a null namespaceURI.

Syntax

var element = document.createElement(tagName);

where,

  • element is the created element object.
  • tagName is a string that specifies the type of element to be created. The nodeName of the created element is initialized with the value of tagName.

References

  1. createElement - W3C Spec
  2. createElement - MDN Link