Modern documents begin with the HTML 5 doctype declaration:
<!doctype html>
Really old documents did not contain this declaration. Because modern standards can not expect all older documents to be updated, browsers instead assume that any document lacking a doctype declaration is an old document.
Old documents did not render according to the rules of HTML5. There were differences and ambiguities in how HTML, CSS, and JS behaved. So modern browsers switch to a backwards compatible method called "quirks mode" when encountering a page without a doctype.
Modern documents begin with the HTML 5 doctype declaration:
Really old documents did not contain this declaration. Because modern standards can not expect all older documents to be updated, browsers instead assume that any document lacking a doctype declaration is an old document.
Old documents did not render according to the rules of HTML5. There were differences and ambiguities in how HTML, CSS, and JS behaved. So modern browsers switch to a backwards compatible method called "quirks mode" when encountering a page without a doctype.
As a reference, these are the commonly encountered doctype declarations for HTML 4, XHTML, and HTML 5: https://css-tricks.com/snippets/html/the-common-doctypes/