Interview Question

What is the difference between HTML4 and HTML5?

HTML5 means modern HTML with simpler syntax, richer semantics, media, and web-application features.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

HTML4 is an older completed HTML specification, while modern HTML follows the HTML Living Standard commonly called HTML5. • Modern HTML uses the short `<!doctype html>` declaration. • It includes elements such as `<main>`, `<video>`, `<canvas>`, and newer form controls. • Many older presentational HTML features are obsolete because presentation belongs in CSS.

💡 Simple Example

<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Modern HTML</title></head><body><main><h1>Example</h1></main></body></html>

⚡ Quick Revision

HTML5 means modern HTML with simpler syntax, richer semantics, media, and web-application features.