logoalt Hacker News

notepad0x90yesterday at 10:19 PM0 repliesview on HN

<p>some sentence here <img src="img.jpeg"/> <p> some other sentence.

In that example, the image could be part of the first paragraph, as it is there, or if i moved the second <p> before the <img> it would be part of the second. but if I want neither, do I not have to close the first paragraph?

Here is a demo of what i mean on this random html paste site: https://htmlbin.online/closetagdemo

I don't know what "not required" means, but it makes a difference with <p> at least in my opinion. I think the author meant that if the succeeding element is of the same type, you don't need to close the previous one.

But even then, this is not a good feature, browsers aren't the only things processing html content, any number of tooling, or even human readers can get confused.