Document.CreateElement

Document.CreateElement method

Creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn’t recognized.

public Element CreateElement(string localName)
ParameterTypeDescription
localNameStringA string that specifies the type of element to be created. The nodeName of the created element is initialized with the value of localName. Don’t use qualified names (like “html:a”) with this method. When called on an HTML document, createElement() converts localName to lower case before creating the element.

Return Value

The new Element.

See Also