HTML5 & Web APIs (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What is HTML5 and what is the role of `<!DOCTYPE html>`?
junior LevelCode ExamplehtmlBasic
In Simple Words:
- HTML5 is the standard markup language for structuring web pages. It introduced native semantic tags, audio/video multimedia, the canvas 2D drawing API, local offline storage, and modern web form controls.
<!DOCTYPE html>: An essential declaration placed on the very first line of an HTML document. It informs the browser's rendering engine to parse and render the document in Standards Mode according to the modern HTML specification, rather than Quirks Mode (which emulates buggy behaviors of 1990s browsers like Netscape Navigator and Internet Explorer 5).
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Semantic HTML Document</title>
</head>
<body>
<!-- Document content -->
</body>
</html>