back to course
Lesson 99 / 10099%· free preview
Exam Prep1/2
HTML Exam Questions
HTML5 theory + tags + structure questions repeatedly asked in 1st-year exams and web-tech vivas.
Overview
Common HTML exam topics — tags, structure, semantic elements, forms, and HTML5 specifics.
1. Theory Questions
- What is HTML? Hyper Text Markup Language — used to structure content on the web. Latest version: HTML5 (2014).
- Difference between HTML and HTML5? HTML5 added semantic tags (
<header>,<footer>,<nav>,<article>),<canvas>,<video>,<audio>, local storage, and stricter doctype. - What is a tag and an attribute? Tag is a markup keyword (
<p>); attribute provides extra info (<img src="x.jpg" alt="…">). - What is the DOCTYPE declaration? First line — tells the browser the HTML version. HTML5:
<!DOCTYPE html>. - Block vs inline element? Block (
<div>,<p>) starts on a new line, full-width. Inline (<span>,<a>) flows in text.
2. Common Tags Asked
| Category | Tags |
|---|---|
| Heading | <h1> to <h6> |
| Text | <p>, <br>, <hr>, <strong>, <em> |
| Lists | <ul>, <ol>, <li>, <dl>, <dt>, <dd> |
| Links / Images | <a>, <img> |
| Tables | <table>, <tr>, <td>, <th>, <thead>, <tbody> |
| Forms | <form>, <input>, <select>, <textarea>, <button> |
| Semantic (HTML5) | <header>, <nav>, <main>, <section>, <article>, <aside>, <footer> |
3. Programs / WAP
- WAP to create a registration form with name, email, password, gender (radio), hobbies (checkbox), submit button.
- WAP to make a table of student marks (3 students × 4 subjects).
- WAP to create an ordered list of programming languages with hyperlinks.
- WAP to embed a YouTube video using
<iframe>.
4. Output / Identify-the-error
html<input type="email" required> <!-- HTML5 — auto-validates email --> <a href="page.html" target="_blank">opens in new tab</a> <img src="x.jpg" alt="logo"> <!-- alt is REQUIRED for accessibility -->
5. Pro Tips
- Always provide
alt=for<img>— exam markers deduct for missing it. - Indent and nest correctly — open tags must close in reverse.
- HTML5 lets you skip closing on
<li>,<p>etc. — but examiners prefer explicit closes. - Mention W3C as the standards body when asked who maintains HTML.
AI-powered recap
Quick recap quiz?
We'll generate 5 MCQs from this lesson and check your understanding instantly. Takes ~30 seconds.
Ready to move on?
// example library
Want more hands-on snippets in HTML5?
Browse 1 runnable example · across 1 chapter · short, copy-paste-friendly · grouped by topic
// did you know?
One surprising fact before your next lesson
Bite-sized programming facts that make your next coffee-break explanation land.
// feedback.matters()
Did this lesson help you?
