Home › HTML Masterclass › Accessibility and Tools
Module 10: Career GuideAll Levels

38. Top 3 Interview Questions and Study Plan (Interview Q&A)

The top questions asked in job interviews and their precise answers

Real-life analogy

An interviewer doesn't check how many tags you have memorised; they check whether or not you know how to write clean, modern and secure code.

Explanation

The top 3 most frequently asked questions:

Q. 1: What is the main difference between HTML and HTML5? Answer: HTML5 added new semantic tags (header, article), video/audio support, local storage and new inputs, all without any third-party software.
Q. 2: What are Empty Tags (Void Elements)? Answer: Tags that have no closing tag and have no text placed inside them, such as <br>, <hr>, <img>, <input>.
Q. 3: What is the difference between HTML and XHTML? Answer: XHTML has the strict rules of XML (every tag must be closed). HTML5 is more flexible and modern.

Golden rules

  • Always keep proper indentation in your code.

Common mistake

Saying in an interview that 'HTML is a programming language'. Always say that it is a markup language.

Example code

<!DOCTYPE html>
<html>
<body style="font-family: sans-serif; padding: 20px;">
  <div style="border-left: 4px solid #10b981; padding-left: 12px;">
    <h3 style="color: #065f46; margin: 0;">Congratulations! The entire HTML course is complete! 🎉</h3>
    <p style="font-size: 13px; color: #334155; margin-top: 4px;">
      Now you can build a complete, responsive and semantic web page on your own.
    </p>
  </div>
</body>
</html>

Run & edit this in the live editor

Quick quiz

Which of these is an example of an 'Empty Tag' (self-closing tag)?

  1. <p>
  2. <div>
  3. <br>
  4. <h1>
Show answer

Answer: <br>

<br> has no closing tag, so it is an Empty Tag.

← All 38 lessons