doctype added to returned HTML (if possible)

add the doctype to the return string (if it was defined)