HTML & CSS interview question · Most asked

What is HTML5, and how is it different from HTML 4?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

HTML5 (a W3C Recommendation in 2014, now the WHATWG's HTML Living Standard) modernised HTML for web applications: semantic structure elements, native video and audio, canvas, new form input types with built-in validation, web storage and other APIs, a short <!DOCTYPE html>, and precisely specified, error-tolerant parsing.

Longer Answer

HTML 4.01 (1999) relied on plug-ins such as Flash for video and graphics and on generic divs for page structure. HTML5 added header, nav, main, article, section, aside and footer; video and audio; canvas and inline SVG; input types such as email, date and range with constraint validation; localStorage and sessionStorage; and defined exactly how browsers must parse even broken markup. Since 2019 there are no numbered versions: HTML is a Living Standard, so "HTML5" now simply means modern HTML.

Key Points

  • Semantic structure elements.
  • Native video, audio and canvas.
  • New input types and validation.
  • Web storage and APIs.
  • Living Standard since 2019.

Deep dive: HTML5 for Beginners: A Short History of HTML

Explanation

What interviewers look for

Concrete features, not just 'it's newer', and awareness of the Living Standard.

Follow-up questions

  • What replaced Flash?
  • Will there be an HTML6?

More most-asked HTML & CSS questions

← All HTML & CSS questions

Was this page helpful?