Fullpath interview question

Check if an HTML Dom is valid