<html> tag becomes the root node of the document.
head and body are suppose to be under this.

I don't know what happens if there is no html tag, many times there isn't.
For now head and body become parallell root nodes under document.
Also documentElement won't be there at all.
That could be a problem.