create_element method

create_element

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

Returns

The new Element.

def create_element(self, local_name):
    ...
ParameterTypeDescription
local_namestrA string that specifies the type of element to be created. The of the created element is initialized
with the value of . Don’t use qualified names (like “html:a”) with this method.
When called on an HTML document, converts to lower case before creating the element.

See Also