HTML Structure
Let's review the previous chapter where we discussed a basic HTML
page along with its corresponding code.
index.html
index.css
index.js
Unlike Python, indentation is not mandatory in HTML
, but it is strongly recommended. In the code provided above, you can observe multiple levels of tag nesting. For instance, the <h2>
and <p>
elements are nested within the <body>
element. In this context, the <h2>
and <p>
tags are regarded as children of the <body>
element, with the <body>
element serving as the parent. We can represent the structure of this document as follows.
![](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/35fdd0a9-2b4b-4032-9ac4-3d848aa08650/s.1+ch.3+schema.png)
Everything was clear?
Course Content
Web Scraping with Python
Web Scraping with Python
HTML Structure
Let's review the previous chapter where we discussed a basic HTML
page along with its corresponding code.
index.html
index.css
index.js
Unlike Python, indentation is not mandatory in HTML
, but it is strongly recommended. In the code provided above, you can observe multiple levels of tag nesting. For instance, the <h2>
and <p>
elements are nested within the <body>
element. In this context, the <h2>
and <p>
tags are regarded as children of the <body>
element, with the <body>
element serving as the parent. We can represent the structure of this document as follows.
![](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/35fdd0a9-2b4b-4032-9ac4-3d848aa08650/s.1+ch.3+schema.png)
Everything was clear?