DocumentCreateElement Method

In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.

Namespace: Aspose.Html.Dom
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 22.4
Syntax
public Element CreateElement(
	string localName
)

Parameters

localName
Type: SystemString

A string that specifies the type of element to be created. The nodeName of the created element is initialized with the value of tagName. Don't use qualified names (like "html:a") with this method. When called on an HTML document, createElement() converts tagName to lower case before creating the element.

Return Value

Type: Element

The new Element.

Examples
var element = document.CreateElement(tagName);
See Also