The document skeleton (DOCTYPE, html, head, body), online
Six activities your students do on their own devices. See who's finished, and their scores.
The document skeleton (DOCTYPE, html, head, body) in one minute
What students need to know
<head> contains information about the page such as its title and stylesheets, none of which appears in the browser window. The <html> tag is the outermost container. Both <head> and <body> are nested directly inside it.
<!DOCTYPE html> must be the very first line - it tells the browser this is a modern HTML document. The exclamation mark before DOCTYPE is required. <DOCTYPE html> without it is not a valid declaration.
Mistakes students make
- The DOCTYPE declaration must start with an exclamation mark: <!DOCTYPE html>. Writing <DOCTYPE html> is missing the ! and is invalid.
- The <html> opening tag is missing its closing angle bracket >. It should be <html>, not <html without the >.
- The <body> tag appears before <head>, but the correct skeleton order is <head> first, then <body>, both nested inside <html>.
- Visible content like <h1> belongs inside <body>, not <head>. The <head> section holds metadata such as <title>, not displayed content.
What students will learn in this module
Every question in Module 4
Quick questions
- Which line must appear first in every HTML file?A<!DOCTYPE html>B<html>
- Where does visible content like headings and paragraphs go?AInside <head>BInside <body>
- True or false: <head> must come before <body> in the HTML skeleton.ATrueBFalse
- Which tag wraps the entire HTML document - both head and body?A<body>B<html>
- True or false: the <title> element belongs inside <body>.AFalseBTrue
Key terms
Students type the meaning of:
<!DOCTYPE html>
Match the pairs
<!DOCTYPE html>Match it to what it does<body> <h1>Hello</h1> </body>Match it to what it does
<head> holds metadata - its content is not visible on the pageMatch it to what it does<html> is the root element - it wraps the entire document including head and bodyMatch it to what it does<DOCTYPE html>Match it to what it does<html> <body></body> <head></head> </html>Match it to what it does
Fill in the blanks
<!___ html> <html> </html>
Hint: Type the keyword that declares the document type
<!DOCTYPE html> <___> </html>
Hint: Type the root element tag that wraps the entire HTML document
<!DOCTYPE html> <html> <___> </head> </html>
Hint: Type the tag that contains page metadata, not visible content
<!DOCTYPE html> <html> <head></head> <___> </body> </html>
Hint: Type the tag that contains all visible page content
<!DOCTYPE html> <html> <head> <title>My Site</title> </head> <body> </___> </html>Hint: Type the closing tag name for the element that holds visible content
Spot the error
Question 1
A<DOCTYPE html>B<html>C <head></head>D <body></body>E</html>
Question 2
A<!DOCTYPE html>B<htmlC <head></head>D <body></body>E</html>
Question 3
A<!DOCTYPE html>B<html>C<body>D <head></head>E</html>
Question 4
A<!DOCTYPE html>B<html>C <head>D <h1>My Title</h1>E </head>F <body></body>
Question 5
A<!DOCTYPE html>B<html>C <head></head>D <body></body>E<html>
