Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
niconii
4y ago
0 comments
Save
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>.
0 comments
1 comments · 1 top-level
top
newest
oldest
anjbe
4y 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