Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Navigating HTML Document | Beautiful Soup: Part I
Web Scraping with Python

Navigating HTML DocumentNavigating HTML Document

After reading the HTML document, you have the flexibility to navigate it in several ways. To delve deeper, you can specify a tag just like an attribute. For example, let's examine the <head> element and represent it in a 'structured' form (by employing the .prettify() method).

Feel free to experiment by substituting the .head attribute with .body, for example. As shown above, the <head> element encompasses several children. You can iterate through all the children of elements using a for loop and the .children attribute.

¿Todo estuvo claro?

Sección 2. Capítulo 2
course content

Contenido del Curso

Web Scraping with Python

Navigating HTML DocumentNavigating HTML Document

After reading the HTML document, you have the flexibility to navigate it in several ways. To delve deeper, you can specify a tag just like an attribute. For example, let's examine the <head> element and represent it in a 'structured' form (by employing the .prettify() method).

Feel free to experiment by substituting the .head attribute with .body, for example. As shown above, the <head> element encompasses several children. You can iterate through all the children of elements using a for loop and the .children attribute.

¿Todo estuvo claro?

Sección 2. Capítulo 2
some-alt