StringFormat
StringFormat["string"] attempts to determine what ImportString format could be used to import the string "string".
Examples
StringFormat["<html><body>Hello</body></html>"]
(* "HTML" *)Please visit the official Wolfram Language Reference for more details.