HTML/CSSIntermediate#html#doctype#rendering

What is quirks mode vs standards mode?

Standards mode renders pages according to W3C specifications, triggered by a valid DOCTYPE. Quirks mode emulates non-standard behavior of old browsers (like Netscape/IE), causing inconsistent box-model and CSS handling, triggered by a missing or malformed DOCTYPE.

Example
<!-- Missing DOCTYPE triggers quirks mode -->
<html><body>Content</body></html>

<!-- Correct: standards mode -->
<!DOCTYPE html>
<html><body>Content</body></html>

Related Questions

1
HTML/CSSBeginner#html#meta

What are the important meta tags in an HTML document?

Open
2
HTML/CSSBeginner#html#meta

What does the viewport meta tag do and why is it needed?

Open
3
HTML/CSSIntermediate#html#performance

What is the difference between <script>, <script async>, and <script defer>?

Open