STEP 1 · LEARNHow it works
DOCTYPE declares the document type, while html, head and body separate page information from visible content.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web workshop</title>
</head>
<body>
<h1>Web workshop</h1>
</body>
</html>
DOCTYPE enables standards mode. lang declares the language, head holds metadata, and body contains what the user sees.
<html>
<head><title>My page</title></head>
<h1>Welcome</h1>
</html>
DOCTYPE, language, charset and body are missing. A browser may display something, but the document does not fully declare its structure.
STEP 2 · APPLYYour exercise
Add a DOCTYPE, language, UTF-8 charset, title and one h1.
index.htmlHTML
STEP 4 · CHECK
What needs to pass
0%not checked
- ○The document starts with <!doctype html>.
- ○The html element declares a language.
- ○The head contains a charset meta tag.
- ○The page has a descriptive title.
- ○The content has one h1.
Explain the solution logic+
Check the structure from the outside in: DOCTYPE, html with lang, head with charset and title, then body with one h1.