Extract the doctype from a HTML document