back to course
Lesson 100 / 100100%· free preview
Exam Prep2/2
Viva Questions
20 short HTML viva Q&A.
Common HTML Viva Questions and Answers
- What is HTML? Hyper Text Markup Language — defines structure of web pages.
- Who developed HTML? Tim Berners-Lee in 1991.
- Latest version? HTML5 (W3C recommendation, 2014).
- Is HTML a programming language? No — it's a markup language (no logic, only structure).
- What is a DOCTYPE? Declares the HTML version. HTML5:
<!DOCTYPE html>. - What is the role of
<head>vs<body>?<head>: meta info (title, links, scripts).<body>: visible content. - What are empty / void tags? Tags with no closing or content (
<br>,<hr>,<img>,<input>,<meta>). - Difference:
<b>vs<strong>?<b>purely visual bold;<strong>carries semantic importance. - What is a hyperlink?
<a href="url">text</a>— clickable link. - Absolute vs relative URL? Absolute: full path (
https://x.com/a.html). Relative: relative to current page (a.html). - What attribute makes a checkbox checked by default?
checked. - Difference: GET vs POST in
<form method>? GET sends data in URL (visible, limited). POST sends in body (hidden, larger). - What is
<iframe>? Inline frame — embeds another HTML document. - What's the use of
idandclass?idis unique per page;classcan repeat — used for styling/JS. - What is a semantic tag? Tag whose name describes its content (
<header>,<nav>,<article>). - HTML comment syntax?
<!-- comment -->. - What is
viewportmeta tag for? Controls page scaling on mobile devices. - What is
<canvas>? HTML5 element for drawing 2D graphics with JavaScript. - What does
target="_blank"do? Opens link in a new tab. - Self-closing vs open/close tags in HTML5? HTML5 allows
<br>without/. Both<br>and<br/>are valid.
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
// side-by-side reference
See this in other languages
Compare the same concept across C, C++, Java, and Python — one table, zero tab-switching.
// feedback.matters()
Did this lesson help you?
