bs4.PageElement.insert_before

PageElement.insert_before(predecessor)[source]

Makes the given element the immediate predecessor of this one.

The two elements will have the same parent, and the given element will be immediately before this one.