0
0
HTMLmarkup~10 mins

Head and body sections 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 start the HTML document with the correct doctype declaration.

HTML
<!DOCTYPE [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'
Ahtml
BHTML
CHtml5
Dhtm
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase letters like which is allowed but less common.
Writing which is incorrect.
Omitting the doctype declaration entirely.
2fill in blank
medium

Complete the code to add a title inside the head section.

HTML
<html lang="en">
<head>
  <meta charset="UTF-8">
  <[1]>My Website</[1]>
</head>
<body>
  <h1>Welcome!</h1>
</body>
</html>
Drag options to blanks, or click blank then click option'
Asection
Bheader
Ctitle
Dhead
Attempts:
3 left
💡 Hint
Common Mistakes
Using <header> instead of <title>.
Placing the title tag inside the body section.
Omitting the closing tag.
3fill in blank
hard

Fix the error in the code by completing the missing body tag.

HTML
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Page</title>
</head>
[1]
  <p>Content here</p>
</body>
</html>
Drag options to blanks, or click blank then click option'
A<head>
B<main>
C<section>
D<body>
Attempts:
3 left
💡 Hint
Common Mistakes
Using <head> instead of <body>.
Omitting the opening body tag.
Placing content outside the body tag.
4fill in blank
hard

Fill both blanks to create a meta tag for responsive design inside the head section.

HTML
<head>
  <meta name=[1] content=[2]>
  <title>Responsive</title>
</head>
Drag options to blanks, or click blank then click option'
A"viewport"
B"width=device-width, initial-scale=1.0"
C"description"
D"text/html; charset=UTF-8"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect name attribute like "description".
Wrong content value causing layout issues on mobile.
Omitting quotes around attribute values.
5fill in blank
hard

Fill all three blanks to create a basic HTML structure with language, charset, and title.

HTML
<!DOCTYPE html>
<html lang=[1]>
<head>
  <meta charset=[2]>
  <title>[3]</title>
</head>
<body>
  <h1>Welcome!</h1>
</body>
</html>
Drag options to blanks, or click blank then click option'
A"en"
B"UTF-8"
CMy Website
D"utf8"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect charset like "utf8" without dash and uppercase.
Omitting quotes around attribute values.
Leaving the title tag empty.