Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why would you nest paragraph tags?




They are not nested, according to HTML5 parsing rules. You get 3 (yes, three) sibling paragraphs, including an empty one.

There being nesting is just implied by the closing tags and indentation. But it is not actually there. I think this is the point of the example: Adding the closing tags just confuses the reader, by implying nesting that is not actually there, and even introduces a third empty paragraph. It might be better left out entirely.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: