Phabricator doesn't produce very valid HTML always

I note phabricator doesn’t produce very valid HTML always,

$ wget -O -|tidy -q
line 1 column 4481 - Warning: <div> isn't allowed in <h1> elements
This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.

How did you notice that? What’s the actual issue here? What doesn’t work as intended?

I was examining the HTML to find the blame for some issue,
and noticed, that even though browsers can still deal with it,
but it even caused HTML tidy to give up… so I would go back
and tighten the bolts. I guarantee you won’t find not even a peep from
various HTML validators on websites I built.

Generating markup which Tidy is satisfied with is not a goal of this project.