HTML stands for HyperText Markup Language. It is the language used to create and structure content on the web.
Click to reveal answer
beginner
What is the main purpose of HTML?
HTML is used to build the structure of web pages by defining elements like headings, paragraphs, links, images, and more.
Click to reveal answer
beginner
What is a tag in HTML?
A tag is a code element in HTML that tells the browser how to display content. Tags usually come in pairs, like <p> and </p> for paragraphs.
Click to reveal answer
intermediate
What is the role of the <head> section in an HTML document?
The <head> section contains information about the page like its title, links to stylesheets, and metadata. It does not show content directly on the page.
Click to reveal answer
intermediate
Why is HTML important for web accessibility?
HTML uses semantic tags that help screen readers and other assistive tools understand the page structure, making websites usable for people with disabilities.
Click to reveal answer
What does the <h1> tag represent in HTML?
AAn image
BA paragraph
CA main heading
DA link
✗ Incorrect
The <h1> tag is used for the main heading of a page or section.
Which part of an HTML document contains the visible content?
A<code><head></code>
B<code><body></code>
C<code><title></code>
D<code><meta></code>
✗ Incorrect
The <body> section contains all the content that shows up on the web page.
Which tag is used to create a hyperlink in HTML?
A<code><a></code>
B<code><img></code>
C<code><link></code>
D<code><div></code>
✗ Incorrect
The <a> tag creates clickable links to other pages or resources.
What is the correct way to start an HTML document?
A<code><title></code>
B<code><body></code>
C<code><head></code>
D<code><html></code>
✗ Incorrect
The <html> tag wraps the entire HTML document.
Why should you use semantic HTML tags?
ATo improve accessibility and SEO
BTo make the page load faster
CTo add colors to the page
DTo create animations
✗ Incorrect
Semantic tags help browsers and assistive tools understand the page better, improving accessibility and search engine ranking.
Explain what HTML is and why it is important for creating web pages.
Think about how web pages are built and what language is used.
You got /3 concepts.
Describe the difference between the <head> and <body> sections in an HTML document.
One is for page info, the other is for visible content.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of HTML in web development?
easy
A. To add interactive behavior to webpage elements
B. To style the colors and fonts of a webpage
C. To give structure and organize content on a webpage
D. To store data in a database
Solution
Step 1: Understand HTML's role
HTML is used to create the structure of a webpage by organizing text, images, and links.
Step 2: Differentiate from other technologies
Styling is done by CSS, behavior by JavaScript, and data storage by databases, not HTML.
Final Answer:
To give structure and organize content on a webpage -> Option C
The heading starts with <h1> but closes with </h2>, which is incorrect.
Step 2: Verify other tags
The <title>, <body>, and <html> tags are correctly used and closed.
Final Answer:
The closing tag for the heading is incorrect -> Option D
Quick Check:
Matching tags must open and close the same [OK]
Hint: Opening and closing tags must match exactly [OK]
Common Mistakes:
Mismatched opening and closing tags
Forgetting to close tags
Misspelling tag names
5. You want to create a simple webpage with a title, a heading, and a paragraph. Which is the correct minimal HTML structure to do this?
hard
A.
<head>
Page Title
Heading
Paragraph text.
B.
Page Title
Heading
Paragraph text.
C.
Heading
Page Title
Paragraph text.
D.
Page Title
Heading
Paragraph text.
Solution
Step 1: Check for required document parts
The document must start with <!DOCTYPE html>, have <html>, <head> with <title>, and <body> for content.
Step 2: Verify correct tag placement
Head contains metadata like title; body contains visible content like heading and paragraph. <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Heading</h1>
<p>Paragraph text.</p>
</body>
</html> follows this structure correctly.