What is the purpose of the <head> section in an HTML document?
The <head> section contains information about the page like its title, links to stylesheets, scripts, and metadata. It does not show content directly on the page.
Click to reveal answer
beginner
What kind of content goes inside the <body> section?
The <body> section holds all the visible content of the webpage, such as text, images, links, and other elements that users see and interact with.
Click to reveal answer
beginner
Why should the <title> tag be placed inside the <head> section?
The <title> tag sets the page title shown in the browser tab and search results. It must be inside <head> so browsers can find and display it properly.
Click to reveal answer
intermediate
Can scripts be placed in both <head> and <body>? What is the difference?
Yes, scripts can be in both. Scripts in <head> load before the page content, which can delay showing the page. Scripts in <body> usually load after content, improving user experience.
Click to reveal answer
beginner
What is metadata and where is it placed in an HTML document?
Metadata is information about the webpage like author, description, and character set. It is placed inside the <head> section and helps browsers and search engines.
Click to reveal answer
Where should the <title> tag be placed in an HTML document?
AInside the <body> section
BInside the <head> section
COutside both <head> and <body>
DInside a <footer> tag
✗ Incorrect
The tag belongs inside the section to set the page title shown in the browser tab.
Which section contains the visible content of a webpage?
A<meta>
B<footer>
C<head>
D<body>
✗ Incorrect
The section holds all the visible content users see on the webpage.
What is NOT typically found in the <head> section?
ALinks to CSS files
BPage title
CParagraph text
DMetadata tags
✗ Incorrect
Paragraph text is visible content and belongs in the , not the .
Why might scripts be placed at the end of the <body> section?
ATo improve page load speed and user experience
BBecause scripts cannot be in <head>
CTo load scripts before content
DTo hide scripts from search engines
✗ Incorrect
Placing scripts at the end of lets the page content load first, making the page appear faster.
Which tag is used to specify the character encoding of the webpage?
A<meta charset>
B<head charset>
C<encoding>
D<charset>
✗ Incorrect
The tag inside sets the character encoding.
Explain the roles of the and sections in an HTML document.
Think about what the user sees versus what helps the browser.
You got /4 concepts.
Describe why metadata is important and where it should be placed in HTML.
Metadata is like the webpage's ID card.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of the <head> section in an HTML document?
easy
A. To hold information for the browser like title and styles, not visible content
B. To display the main content visible to users
C. To create navigation menus
D. To add images and videos to the page
Solution
Step 1: Understand the role of the <head> section
The <head> contains metadata like the page title, links to stylesheets, and scripts, which the browser uses but does not show directly.
Step 2: Compare with <body> section
The <body> holds visible content like text and images, unlike the <head> which is for behind-the-scenes info.
Final Answer:
To hold information for the browser like title and styles, not visible content -> Option A
Quick Check:
<head> = browser info, not visible [OK]
Hint: Head is for browser info, body is for visible content [OK]
Common Mistakes:
Thinking <head> shows content on the page
Confusing <head> with <body>
Believing <head> holds images or text visible to users
2. Which of the following is the correct structure for an HTML document's head and body sections?
easy
A. ......
B. ......
C. ......
D. ......
Solution
Step 1: Recall the correct order of HTML tags
The <html> tag wraps the whole document. Inside it, <head> comes first, then <body>.
Step 2: Check each option's tag order
<html><head>...</head><body>...</body></html> correctly places <head> before <body> inside <html>. Others have wrong order or nesting.
Final Answer:
<html><head>...</head><body>...</body></html> -> Option A
Quick Check:
HTML structure = html > head > body [OK]
Hint: Head always before body inside html tag [OK]
Common Mistakes:
Placing body before head
Nesting html inside head or body
Missing closing tags
3. What will be displayed in the browser when this HTML code runs?