Turning Learners Into Developers
Codekilla
CODEKILLA
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
  1. What is HTML? Hyper Text Markup Language — defines structure of web pages.
  2. Who developed HTML? Tim Berners-Lee in 1991.
  3. Latest version? HTML5 (W3C recommendation, 2014).
  4. Is HTML a programming language? No — it's a markup language (no logic, only structure).
  5. What is a DOCTYPE? Declares the HTML version. HTML5: <!DOCTYPE html>.
  6. What is the role of <head> vs <body>? <head>: meta info (title, links, scripts). <body>: visible content.
  7. What are empty / void tags? Tags with no closing or content (<br>, <hr>, <img>, <input>, <meta>).
  8. Difference: <b> vs <strong>? <b> purely visual bold; <strong> carries semantic importance.
  9. What is a hyperlink? <a href="url">text</a> — clickable link.
  10. Absolute vs relative URL? Absolute: full path (https://x.com/a.html). Relative: relative to current page (a.html).
  11. What attribute makes a checkbox checked by default? checked.
  12. Difference: GET vs POST in <form method>? GET sends data in URL (visible, limited). POST sends in body (hidden, larger).
  13. What is <iframe>? Inline frame — embeds another HTML document.
  14. What's the use of id and class? id is unique per page; class can repeat — used for styling/JS.
  15. What is a semantic tag? Tag whose name describes its content (<header>, <nav>, <article>).
  16. HTML comment syntax? <!-- comment -->.
  17. What is viewport meta tag for? Controls page scaling on mobile devices.
  18. What is <canvas>? HTML5 element for drawing 2D graphics with JavaScript.
  19. What does target="_blank" do? Opens link in a new tab.
  20. 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
Explore examples
// side-by-side reference
See this in other languages
Compare the same concept across C, C++, Java, and Python — one table, zero tab-switching.
Compare Languages
// feedback.matters()
Did this lesson help you?