get_elements_by_tag_name method

get_elements_by_tag_name

This method returns an HTMLCollection of elements with the given tag name.

The complete document is searched, including the root node. The returned HTMLCollection is live, meaning that it updates itself automatically to stay in sync with the DOM tree without having to call this method again.

Returns

A live HTMLCollection of found elements in the order they appear in the tree.

def get_elements_by_tag_name(self, tagname):
    ...
ParameterTypeDescription
tagnamestrA string representing the name of the elements. The special string represents all elements.

Remarks

Refer to official spec.

See Also