Created
March 21, 2023 16:39
-
-
Save Tynael/8ae9cf1e42556f387ed6615a2bb5809e to your computer and use it in GitHub Desktop.
Example of a web page rendered with and without DOCTYPE declaration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>With DOCTYPE. NOT in Quirks mode.</title> | |
<style> | |
.styled { | |
color: red; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>HTML with DOCTYPE</h1> | |
<p class="STYLED">I'm a styled paragraph. Or am I?!</p> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Without DOCTYPE. IN QUIRKS MODE!</title> | |
<style> | |
.styled { | |
color: red; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>IN QUIRKS MODE! HTML without DOCTYPE. </h1> | |
<p class="STYLED">Wow...I'm a styled paragraph.</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Examples used for https://neutrondev.com/what-is-doctype-html/