Skip to content

Comment on XHP: A New Way to Write PHP (from Facebook)parent

Comments

The HTML tag closing rules specify they only get closed when they have to be. So neither of your solutions is correct. It is:

<div>foo<a>bar<span>baz box</span></a></div>

my solution was to merely demonstrate the difference between what a programmer writes and what gets sent as an http response.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.