0
0
HTMLmarkup~10 mins

HTML document structure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start a basic HTML document with the correct doctype declaration.

HTML
<!DOCTYPE [1]>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My Page</title>
</head>
<body>
</body>
</html>
Drag options to blanks, or click blank then click option'
Ahtml
BHTML5
CHtml
DHTML
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase or mixed case like HTML or Html instead of lowercase html.
Forgetting the exclamation mark or angle brackets.
2fill in blank
medium

Complete the code to set the language of the HTML document to English.

HTML
<html [1]="en">
<head>
  <meta charset="UTF-8">
  <title>My Page</title>
</head>
<body>
</body>
</html>
Drag options to blanks, or click blank then click option'
Alang
Blanguage
Cxml:lang
Dlocale
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'language' or 'locale' instead of 'lang'.
Forgetting to put the attribute on the html tag.
3fill in blank
hard

Fix the error in the head section by completing the meta tag for responsive design.

HTML
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="[1]">
  <title>My Page</title>
</head>
Drag options to blanks, or click blank then click option'
Awidth=device-width; initial-scale=1.0
Bwidth=device-width, initial-scale=1.0
Cwidth=device-width initial-scale=1.0
Dwidth=device-width: initial-scale=1.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using spaces or semicolons instead of commas between properties.
Missing the initial-scale property.
4fill in blank
hard

Fill both blanks to create a semantic HTML5 document structure with header and main sections.

HTML
<[1]>
  <h1>Welcome</h1>
</[2]>
<main>
  <p>This is the main content.</p>
</main>
Drag options to blanks, or click blank then click option'
Aheader
Bfooter
Chead
Dsection
Attempts:
3 left
💡 Hint
Common Mistakes
Using head instead of header for visible page content.
Using footer or section incorrectly.
5fill in blank
hard

Fill all three blanks to create a complete HTML5 document with language, charset, and title.

HTML
<!DOCTYPE [1]>
<html [2]="en">
<head>
  <meta charset="[3]">
  <title>Sample Page</title>
</head>
<body>
</body>
</html>
Drag options to blanks, or click blank then click option'
Ahtml
Blang
CUTF-8
DHTML
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase 'HTML' in doctype.
Using 'language' instead of 'lang'.
Using wrong charset values like 'utf8' or missing hyphen.