Problem Statement
What is the correct DOCTYPE declaration for HTML5?
Explanation
The correct HTML 5 DOCTYPE is simply DOCTYPE html. It is much shorter than older versions. You can write it in uppercase or lowercase, but uppercase is conventional. This triggers standards mode in all browsers.
Code Solution
SolutionRead Only
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML5 Document</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>