createElement
Description
The createElement of Document for JS returns an element with localName as local name (if document is an HTML document, localName gets lowercased). The element’s namespace is the HTML namespace when document is an HTML document or document’s content type is "application/xhtml+xml"; otherwise null.
If localName does not match the Name production an "InvalidCharacterError" DOMException will be thrown.
When supplied, options’s is can be used to create a customized built-in element.
Syntax
element = document.createElement(localName [, options])
Parameters
localName
A local name.
options
is
Used to create a customized built-in element.