in reply to Extracting appropriate language text from HTML data

and, TIMTOWTDI, in line with dhoss suggestion and links to docs, don't forget feasibility of using a <DTD...
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
fact is, I generally go the belt and suspenders route, following that with
<html lang="en">
and, while I can't find ref just now, believe you might be able to send header and DTD or <html lang="en"> and wait for response. IIRC, browser is supposed to reply with preferences.