Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
niconii
3y ago
0 comments
Share
You have to know about what breaks out of <p> tags
regardless
of whether or not you leave off the end tag, though.
<p><div></div></p> is invalid HTML because <div> ends the paragraph, resulting in an unpaired </p>.
undefined | Better HN
0 comments
default
newest
oldest
anjbe
3y ago
And not just because of that. In XHTML‐as‐XML, where <div> does not implicitly end the paragraph, what you posted is still invalid because <p> cannot contain <div>.
j
/
k
navigate · click thread line to collapse