Hacker News new | ask | show | jobs
by thepete2 2357 days ago
Really? He doesn't close the <p> tags.
2 comments

That's only a problem for XHTML. HTML5 implicitly closes the previous <p> tag when you open the next one; thus, a <p> inside a <p> is an implicit </p><p>, if you will.
Why does VS Code auto add the closing <p> tag when you open them then? It doesn’t do it for, say, <img>. Bug?
Feature. <p> tags can function as containers for text and other elements, and VS Code can't distinguish between <p>, with the special handling, and <div>, without it.

Okay, to be fair, that does sound like a bug.

Didn't know that. Thanks :)
That’s optional in HTML5