While studying about the compatibility view of Internet Explorer, I've read that it is unnecessary to put
<meta http-equiv="X-UA-Compatible" content="IE=edge">
in a HTML document unless it is for 'Local Intranet'. According to the articles I have read,
if no X-UA-Compatible meta tag is present in a document, the browser checks the user's compatibility view settings. If the user doesn't have certain website specified in the views list, the browser checks for the presence of <!DOCTYPE declaration and if it is present, it automatically renders as the latest Standards Mode, otherwise it renders as Quirks Mode.
If that's the case, I wonder what would happen in these situations below,
If an user's browser is very old (eg. IE 6 or 7) and there is no compatibility meta tag specified. Will it render as latest Standard Mode if DOCTYPE is present? then how the browser can handle the latest functions and CSS etc ?
I have read about Quirk Mode too, but what exactly is the Quirk Mode? How does it affect the rendering?
If
<meta http-equiv="X-UA-Compatible" content="IE=7">is specified in the document, will it render as IE7 for ALL browsers even the browsers are the latest?
Yes, provided the DOCTYPE is one that triggers standards mode, e.g. one for a Strict DTD that contains all the necessary bits (public identifier, system identifier, etc). Standards mode is available in Internet Explorer 6 and later.
It handles whatever it understands to the best of its ability.
This is too broad to answer in depth, but see http://jkorpela.fi/quirks-mode.html. In short, quirks mode is a compatibility mode designed for really old (think 20 years old) and/or really broken sites.
Yes, up to and including Internet Explorer 11.
Despite the word "edge", the X-UA-Compatible header and meta tag are completely irrelevant to Microsoft Edge, and so nothing in this topic applies to that browser: