logoalt Hacker News

hnlmorgyesterday at 10:21 AM3 repliesview on HN

2. And there’s no ambiguity there, just invalid HTML because paragraphs aren’t nestable.


Replies

kzrdudeyesterday at 10:30 AM

It may look nested but the first p is actually closed when the second p starts, according to https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

show 2 replies
vbezhenaryesterday at 10:40 AM

Browser will parse that as three HTMLParagraphElements. You may think that's invalid HTML, but browser will parse it and won't indicate any kind of error.

show 2 replies
urbandw311eryesterday at 10:43 AM

Excellent catch