0
0
HTMLmarkup~10 mins

DOCTYPE declaration in HTML - Interactive Code Practice

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

Complete the code to declare the document type for HTML5.

HTML
<![1] html>
Drag options to blanks, or click blank then click option'
ADOCTYPE
Bdoctype
CDocType
DDoc
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase 'doctype' instead of uppercase 'DOCTYPE'.
Misspelling the word or using 'DocType'.
2fill in blank
medium

Complete the code to start a basic HTML5 document with the correct DOCTYPE declaration.

HTML
[1]
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My Page</title>
</head>
<body>
  <p>Hello!</p>
</body>
</html>
Drag options to blanks, or click blank then click option'
A<!DOCTYPE HTML5>
B<!DOCTYPE html>
C<!doctype html>
D<!DOCTYPE html5>
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase 'doctype' which may cause quirks mode.
Adding 'HTML5' which is not part of the official declaration.
3fill in blank
hard

Fix the error in the DOCTYPE declaration to make it valid HTML5.

HTML
<![1] html>
Drag options to blanks, or click blank then click option'
Adoctype
BDOCTYPE5
CDOCTYPE
DDOCTYPE html
Attempts:
3 left
💡 Hint
Common Mistakes
Including 'html' inside the blank.
Using lowercase 'doctype'.
Adding extra text like 'DOCTYPE5'.
4fill in blank
hard

Fill both blanks to complete the minimal HTML5 document with correct DOCTYPE and language attribute.

HTML
[1]
<html [2]>
<head>
  <meta charset="UTF-8">
  <title>Test</title>
</head>
<body></body>
</html>
Drag options to blanks, or click blank then click option'
A<!DOCTYPE html>
Blang="en"
Clang="fr"
D<!doctype html>
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase DOCTYPE.
Using wrong language code like 'fr' when English is expected.
5fill in blank
hard

Fill all three blanks to create a valid HTML5 document with DOCTYPE, language attribute, and meta viewport tag.

HTML
[1]
<html [2]>
<head>
  <meta charset="UTF-8">
  <meta [3]>
  <title>Responsive</title>
</head>
<body></body>
</html>
Drag options to blanks, or click blank then click option'
A<!DOCTYPE html>
Blang="en"
Cname="viewport" content="width=device-width, initial-scale=1.0"
Dlang="es"
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase DOCTYPE.
Wrong language code like 'es' instead of 'en'.
Missing or incorrect viewport meta tag.