Skip to main content

Posts

Showing posts from January, 2022

Why ?

➊ History ✪ In the old days of the web, pages were written in two versions: One for Netscape Navigator, and one for Microsoft IE. ✪ When the web standards were made at W3C, browsers could not just start using them, as doing so would break most existing sites on the web. ✪ Browsers therefore introduced two modes to treat new standards compliant sites differently from old legacy sites. ✪ Modes are: Quirks Mode and Standards Mode. ✪ For HTML documents, browsers use a DOCTYPE in the beginning of the document to decide which mode to handle. ➋ Doctype ⬒ In HTML, the doctype is required to ensure that the browser makes a best-effort attempt at following the relevant specifications. ⬔ Doctype is not an HTML element, rather a special instruction to the browser. ⬓ If specified, it has to be at the beginning of the HTML document just after the Byte-Order-Mark (BOM) if any. ⬕ The DOCTYPE for HTML5 is case-insensitive and can be written as Down pointing backhand index ➌ Forma...