HTML Examination & Practical Preparation
HTML Examination & Practical Preparation
HTML assessment generally evaluates two complementary skills: conceptual understanding and practical implementation.
A strong preparation strategy should therefore cover HTML terminology, document structure, elements, attributes, semantic HTML, forms, tables, multimedia, accessibility, SEO, responsive design, debugging, and practical webpage development.
Do not prepare HTML only by memorising tags. You should be able to identify, explain, write, debug, modify, and apply HTML code.
1. Complete HTML Examination Areas
| Area | What You Should Know |
|---|---|
| HTML Fundamentals | HTML definition, elements, tags, attributes and document structure. |
| Text | Headings, paragraphs, formatting and quotations. |
| Links | Absolute URLs, relative URLs, anchors and navigation. |
| Images | src, alt, dimensions, responsive images and optimization. |
| Lists | Ordered, unordered and description lists. |
| Tables | Rows, cells, headings, captions, spanning and accessibility. |
| Forms | Controls, input types, labels, validation and submission. |
| Semantic HTML | header, nav, main, section, article, aside and footer. |
| Multimedia | Audio, video, source and embedded content. |
| Accessibility | Semantic structure, alt text, labels, keyboard access and ARIA. |
| SEO | Title, metadata, headings, links and semantic structure. |
| Responsive HTML | Viewport, responsive images and mobile-friendly structure. |
| Advanced HTML | Templates, Web Components, Shadow DOM, data attributes and native interactive elements. |
| Debugging | Finding structural, attribute, nesting and validation errors. |
2. Must-Know Definitions
These are frequently useful in short-answer, viva, and objective examinations.
| Term | Definition |
|---|---|
| HTML | HyperText Markup Language used to structure webpages. |
| Element | A complete HTML construct representing content or structure. |
| Tag | Markup notation used to identify an HTML element. |
| Attribute | Additional information or configuration associated with an element. |
| Semantic HTML | HTML that communicates the meaning and role of content. |
| DOM | Document Object Model representing the document as an object tree. |
| Accessibility | Designing webpages so that people with different abilities can use them. |
| SEO | Search Engine Optimization, improving content discoverability and interpretation. |
| Responsive Design | Designing webpages to work effectively across different screen sizes and devices. |
3. Essential HTML Document Structure
Be able to write the basic document structure without referring to notes.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, initial-scale=1.0">
<title>HTML Practical</title>
</head>
<body>
<h1>HTML Practical Examination</h1>
<p>
Welcome to the practical assessment.
</p>
</body>
</html>
Memorise the structure, but understand the purpose of each
section. Examiners may ask you to identify what belongs in
<head> and what belongs in
<body>.
4. Important Theory Questions
Q1. What is HTML?
Answer
HTML stands for HyperText Markup Language and is used to structure content on webpages.
Q2. Differentiate between an element and an attribute.
Answer
An element represents a complete HTML structure, while an attribute provides additional information or configuration for an element.
<a
href="https://example.com">
Visit Website
</a>
Here, <a>...</a> is the element and
href is an attribute.
Q3. What is semantic HTML?
Answer
Semantic HTML uses elements that communicate the meaning
and purpose of their content, such as
<header>,
<nav>,
<main>, and
<article>.
Q4. Why is the alt attribute important?
Answer
It provides alternative text for images and is important for accessibility, particularly for users who cannot perceive the image.
Q5. What is the difference between GET and POST?
Answer
GET commonly sends request parameters through the URL and is generally used for retrieval-oriented operations. POST sends submitted data in the request body and is commonly used for operations that submit or modify data.
5. Output-Based Questions
In an output-based question, carefully read the markup and determine what the browser will render.
Question 1
<h1>HTML</h1>
<p>
Learn <strong>HTML</strong> step by step.
</p>
Expected observation:
A main heading followed by a paragraph in which
HTML has strong importance.
Question 2
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ol>
Expected observation: The browser displays a numbered list.
Question 3
<ul>
<li>Python</li>
<li>JavaScript</li>
</ul>
Expected observation: The browser displays an unordered list, normally using bullets.
Do not assume CSS styling when the question provides only HTML. Focus on what the HTML itself contributes.
6. Code-Writing Questions
Q1. Write HTML code to create a heading and paragraph.
Answer
<h1>Web Development</h1>
<p>
HTML provides the structure of a webpage.
</p>
Q2. Create a hyperlink to another webpage.
Answer
<a href="https://example.com">
Visit Website
</a>
Q3. Insert an accessible image.
Answer
<img
src="images/course.jpg"
alt="HTML learning course">
Q4. Create an ordered list containing three subjects.
Answer
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ol>
7. Table Practical
A common practical task is to create a structured table.
Question
Create a table displaying the names, subjects and scores of three learners.
Solution
<table>
<caption>
Assessment Results
</caption>
<thead>
<tr>
<th>Student</th>
<th>Subject</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>Alex Morgan</td>
<td>HTML</td>
<td>92</td>
</tr>
<tr>
<td>Taylor Lee</td>
<td>HTML</td>
<td>87</td>
</tr>
<tr>
<td>Jordan Smith</td>
<td>HTML</td>
<td>95</td>
</tr>
</tbody>
</table>
For a well-structured table, understand the roles of
<caption>,
<thead>,
<tbody>,
<tr>,
<th>, and
<td>.
8. Form Practical
Forms are one of the most important practical areas in HTML.
Question
Create a registration form containing name, email, password, course selection and a submit button.
Solution
<form action="/register" method="post">
<div>
<label for="name">
Full Name
</label>
<input
id="name"
name="name"
type="text"
required>
</div>
<div>
<label for="email">
Email Address
</label>
<input
id="email"
name="email"
type="email"
required>
</div>
<div>
<label for="password">
Password
</label>
<input
id="password"
name="password"
type="password"
required>
</div>
<div>
<label for="course">
Course
</label>
<select
id="course"
name="course"
required>
<option value="">
Select a course
</option>
<option value="html">
HTML
</option>
<option value="css">
CSS
</option>
</select>
</div>
<button type="submit">
Register
</button>
</form>
9. Form Validation Practical
HTML provides several native validation features.
<form>
<label for="email">
Email
</label>
<input
id="email"
name="email"
type="email"
required>
<label for="age">
Age
</label>
<input
id="age"
name="age"
type="number"
min="13"
max="100"
required>
<button type="submit">
Submit
</button>
</form>
| Attribute | Purpose |
|---|---|
required |
Requires a value. |
min |
Specifies a minimum value where supported. |
max |
Specifies a maximum value where supported. |
minlength |
Specifies minimum text length. |
maxlength |
Specifies maximum text length. |
pattern |
Specifies a regular-expression-based constraint. |
10. Semantic HTML Practical
Convert a generic webpage structure into semantic HTML.
Preferred Structure
<header>
<h1>Learning Portal</h1>
<nav>
<a href="/">Home</a>
<a href="/courses">Courses</a>
<a href="/contact">Contact</a>
</nav>
</header>
<main>
<section>
<h2>Featured Courses</h2>
<article>
<h3>HTML Fundamentals</h3>
<p>
Learn HTML from fundamentals to advanced concepts.
</p>
</article>
</section>
</main>
<footer>
<p>
© 2026 Learning Portal
</p>
</footer>
The examiner may award marks not only for correct rendering but also for appropriate semantic structure.
11. HTML Debugging Practice
Identify and correct the errors in the following code.
Question
<html>
<head>
<title>My Page</title>
<body>
<h1>Welcome</h2>
<p>
Learn HTML
</body>
</html>
Problems
-
The
<head>element has not been closed. -
The heading opens with
<h1>but closes with</h2>. - The paragraph should be properly closed.
Corrected Version
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
<p>
Learn HTML
</p>
</body>
</html>
12. Common HTML Errors in Practical Exams
| Error | Correct Approach |
|---|---|
| Missing closing tags where required | Check element structure and nesting. |
| Incorrectly nested elements | Close elements in the correct order. |
Missing alt on meaningful images |
Provide appropriate alternative text. |
| Unlabelled form controls | Associate controls with labels. |
| Using headings for visual size | Use headings according to document hierarchy. |
| Using tables for page layout | Use tables for tabular data and CSS for layout. |
Using div for everything |
Prefer semantic elements where appropriate. |
| Broken relative paths | Verify file and folder structure. |
| Incorrect form control type | Choose the input type matching the expected data. |
| Forgetting the viewport metadata | Include appropriate viewport configuration for responsive pages. |
13. Complete Practical Examination Project
Build a small responsive course webpage using HTML.
Required Features
- Document structure.
- Page title.
- Header and navigation.
- Main heading.
- Course description.
- Course image with alternative text.
- Ordered or unordered list of topics.
- Course information table.
- Registration form.
- Native form validation.
- FAQ using
<details>. - Footer.
Suggested File Structure
html-course/
│
├── index.html
│
├── images/
│ └── course.jpg
│
└── pages/
└── registration.html
Suggested Page Structure
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, initial-scale=1.0">
<title>HTML Course</title>
</head>
<body>
<header>
<h1>HTML Fundamentals</h1>
<nav>
...
</nav>
</header>
<main>
<section>
<h2>Course Overview</h2>
<img
src="images/course.jpg"
alt="HTML course">
<p>
Learn HTML from fundamentals to advanced concepts.
</p>
</section>
<section>
<h2>Course Topics</h2>
<ul>
...
</ul>
</section>
<section>
<h2>Course Information</h2>
<table>
...
</table>
</section>
<section>
<h2>Registration</h2>
<form>
...
</form>
</section>
<section>
<h2>FAQs</h2>
<details>
...
</details>
</section>
</main>
<footer>
<p>
© 2026 HTML Course
</p>
</footer>
</body>
</html>
14. Practical Examination Task Bank
| Level | Task |
|---|---|
| Basic | Create a webpage containing headings, paragraphs and text formatting. |
| Basic | Create ordered and unordered lists. |
| Basic | Create hyperlinks between two webpages. |
| Basic | Insert images with meaningful alternative text. |
| Intermediate | Create a structured table containing headings and multiple records. |
| Intermediate | Create a registration form with appropriate controls. |
| Intermediate | Apply native form validation. |
| Intermediate | Create a semantic webpage using HTML5 elements. |
| Advanced | Create a responsive image using srcset or picture. |
| Advanced | Create expandable FAQ content using details and summary. |
| Advanced | Create a reusable HTML structure using template. |
| Advanced | Create a simple custom element using Web Components. |
| Advanced | Debug and correct a deliberately broken HTML document. |
15. HTML Practical Viva Questions
Q1. Why did you use <main>?
Answer
It identifies the primary content of the document and provides semantic structure and accessibility benefits.
Q2. Why did you use <nav>?
Answer
It identifies a section containing important navigation links.
Q3. Why is the alt attribute present?
Answer
It provides alternative text for the image and supports accessibility.
Q4. Why did you use required?
Answer
It applies a native constraint requiring the user to provide a value before successful form submission.
Q5. Why did you use a table?
Answer
The information represents tabular data with meaningful relationships between rows and columns.
Q6. Why should a table not be used for webpage layout?
Answer
Tables are intended for tabular data. Page layout should be handled through CSS layout mechanisms so that the document remains semantic, responsive, and accessible.
Q7. Why did you choose this input type?
Answer
Input types communicate the expected kind of data and can provide appropriate browser behavior and native validation.
Q8. What happens if JavaScript is disabled?
Answer
The answer depends on the application. A well-designed page should preserve its core HTML content and essential functionality wherever practical, following progressive enhancement principles.
16. Practical Examination Marking Strategy
When completing a practical task, work systematically rather than writing the entire document randomly.
- Read the complete question first.
- Identify all required components.
- Create the document skeleton.
- Add semantic structure.
- Insert content and controls.
- Check attributes.
- Validate nesting and closing tags.
- Test every link and form control.
- Check accessibility requirements.
- Review the final output before submission.
Complete the required functionality first. Then use the remaining time to check semantics, accessibility, spelling, paths, validation, and presentation.
17. Five-Minute Debugging Checklist
| Check | Question |
|---|---|
| Document | Is <!DOCTYPE html> present? |
| Language | Does the document specify the correct lang? |
| Head | Is the title present? |
| Viewport | Is appropriate viewport metadata included? |
| Headings | Is the heading hierarchy logical? |
| Images | Are meaningful images given appropriate alternative text? |
| Links | Do links point to the intended destinations? |
| Forms | Are controls labelled and named appropriately? |
| Tables | Are rows, headings and cells correctly structured? |
| Nesting | Are elements correctly nested? |
| Paths | Are image, stylesheet and page paths correct? |
| Console | Are there browser errors related to the page? |
18. Common Examination Traps
| Trap | Correct Understanding |
|---|---|
| HTML is a programming language. | HTML is a markup language. |
<h1> is used simply because it looks largest. |
Headings should represent document hierarchy. |
<br> should be repeatedly used for layout. |
Use CSS for layout and spacing. |
| Every image needs descriptive alt text. | Meaningful images need appropriate alternative text; decorative images can use empty alt text. |
| Tables are ideal for webpage layout. | Tables are for tabular data. |
| ARIA should always be added to semantic elements. | Prefer native semantics and add ARIA only when needed. |
| GET and POST are interchangeable. | They have different HTTP semantics and use cases. |
19. Examination Question Bank
One-Mark Questions
- What does HTML stand for?
- What is the purpose of the DOCTYPE declaration?
- Which attribute provides alternative text for an image?
- Which element represents the main content of a document?
- Which element is used to create a hyperlink?
- Which element represents tabular data?
- Which attribute identifies a form control during submission?
- What is the purpose of the
requiredattribute? - What does DOM stand for?
- What is the purpose of the
langattribute?
Two-Mark Questions
- Differentiate between HTML elements and attributes.
- Differentiate between ordered and unordered lists.
- Explain semantic HTML with two examples.
- Differentiate between GET and POST.
- Explain the purpose of alternative text.
- Explain the difference between
<section>and<article>. - What is the purpose of the viewport meta tag?
- Explain the difference between
<progress>and<meter>.
Four/Five-Mark Questions
- Explain the structure of a complete HTML document with suitable code.
- Design an accessible registration form using appropriate HTML controls and validation attributes.
- Explain semantic HTML and describe the purpose of major semantic elements.
-
Explain responsive image techniques using
srcset,sizes, and<picture>. - Explain Web Components, Custom Elements, Shadow DOM, templates, and slots.
20. Advanced Practical Challenge
Create a complete Course Registration Portal using HTML.
Requirements
- Use semantic HTML5 structure.
- Create a navigation section.
- Add a course description.
- Add a responsive course image.
- Create a course information table.
- Create an accessible registration form.
- Use at least five appropriate input types.
- Apply native validation.
- Add an expandable FAQ.
- Add an audio or video resource.
- Use meaningful headings.
- Provide alternative text for meaningful images.
- Use appropriate metadata.
- Test the page on different viewport sizes.
After completing the page, inspect it using browser developer tools and identify opportunities to improve accessibility, semantics, performance, and maintainability.
21. Rapid-Fire Viva Revision
| Question | Answer |
|---|---|
| HTML full form? | HyperText Markup Language. |
| HTML programming language? | No. |
| Purpose of DOCTYPE? | Declares the HTML document type and enables standards-oriented rendering. |
| Image alternative text? | alt. |
| Hyperlink element? | <a>. |
| Main content element? | <main>. |
| Navigation element? | <nav>. |
| Tabular data? | <table>. |
| Form label? | <label>. |
| Required form field? | required. |
| DOM full form? | Document Object Model. |
| Expandable native content? | <details> and <summary>. |
| Task completion? | <progress>. |
| Measurement within a range? | <meter>. |
| Reusable HTML template? | <template>. |
| Custom reusable component? | Web Components / Custom Elements. |
22. Last-Minute Examination Preparation
If only a short amount of time remains before the examination, revise in the following order:
- Document structure
- Headings and text formatting
- Links and images
- Lists and tables
- Forms and validation
- Semantic HTML5
- Accessibility
- Responsive HTML
- SEO fundamentals
- Multimedia and embedded content
- Debugging
- Advanced HTML concepts
Spend less time rereading notes and more time writing HTML from memory, predicting output, correcting broken code, and building complete webpages.
23. Final HTML Examination Checklist
| Skill | Ready? |
|---|---|
| I can write a complete HTML document from memory. | ☐ |
| I can explain elements and attributes. | ☐ |
| I can create headings, paragraphs and formatted text. | ☐ |
| I can create links and navigation. | ☐ |
| I can insert accessible images. | ☐ |
| I can create ordered, unordered and description lists. | ☐ |
| I can create and structure tables. | ☐ |
| I can create accessible forms. | ☐ |
| I understand native form validation. | ☐ |
| I can use semantic HTML5 elements. | ☐ |
| I understand multimedia elements. | ☐ |
| I understand accessibility and ARIA basics. | ☐ |
| I understand HTML SEO fundamentals. | ☐ |
| I can create mobile-friendly HTML. | ☐ |
| I can debug incorrectly written HTML. | ☐ |
| I can use browser developer tools to inspect HTML. | ☐ |
| I understand templates and Web Components. | ☐ |
| I can build a complete webpage independently. | ☐ |
By the end of this preparation, you should be able to move from question → design → HTML structure → code → test → debug → improve without depending on a ready-made template.