This is a regression caused by the fix for bug 36401. Steps to reproduce: emacs -Q M-x browse-url-emacs RET https://www.gnu.org/software/emacs/ RET Expected results: The HTML contents of the Emacs website are shown, and the buffer is in mhtml-mode. Actual results: The HTML contents of the Emacs website are shown, but the buffer is in fundamental-mode. The proposed solution to accomodate both wanted behaviors is to extend the regular expression to cover a "DOCTYPE" in a case-insensitive way. The standard says that's also supported: https://html.spec.whatwg.org/multipage/syntax.html#the-doctype I've attached a patch with the proposed solution, on top of emacs-27. Let me know if you'd want to apply it on top of master instead. Thanks.