div actually a child of the h3 element. You cannot have the p element and div inside the p element:
"The P element is a paragraph. It cannot contain block level elements (including P itself).
Ref: 9.3.1 Points: P element
When the browser encounters the second paragraph, it will complete the first paragraph, so the second paragraph and the div element end after the first paragraph:
<h3>Header 3</h3> <div>Sibling divivion</div> <p></p> <p>Nested paragraph</p> <div>Nested division</div> <p></p>
The end tag for the paragraph is optional, so the paragraph ends with either the ending tag or the next block element begins. The proposed closing tag for the first paragraph skips the start tag and ends as a separate paragraph.
Guffa source share