|
|
|
|
|
by niconii
1513 days ago
|
|
I mentioned "block elements" in my other comment, but to be clear, CSS has no effect on how HTML is parsed, so the display property isn't relevant here. Furthermore, you need to know about this rule even if you do write `</p>`. If you write this: <p>
<div>hello</div>
</p>
it is invalid HTML. This is because the paragraph is auto-closed, and then your code is equivalent to this: <p>
</p><div>hello</div>
</p>
resulting in an error because of the extra `</p>` after the `</div>`. |
|