The findAll function is responsible for finding tags based on their name and attribute. But what if you need to find a tag based on its location in a document?

That’s where tree navigation comes in handy. In the earlier video we looked at navigating a BeautifulSoup tree in a single direction.

Now we will look at how to navigate up, across and diagonally through HTML trees.