What is HTML5? What is the difference between HTML and HTML5 ? Explain HTML-5What is the difference between HTML and XHTML? XHTML and HTML most important differences ~ Interview Questions & Answers

Thursday, April 18, 2013

What is HTML5? What is the difference between HTML and HTML5 ? Explain HTML-5

HTML5 will be the new standard for HTML.
The previous version of HTML, HTML 4.01, came in 1999. The web has changed a lot since then.
HTML5 is still a work in progress. However, the major browsers support many of the new HTML5 elements and APIs.

HTML5 - New Features

Some of the most interesting new features in HTML5:
  • The <canvas> element for 2D drawing
  • The <video> and <audio> elements for media playback
  • Support for local storage
  • New content-specific elements, like <article>, <footer>, <header>, <nav>, <section>
  • New form controls, like calendar, date, time, email, url, search

What is the difference between HTML and XHTML? XHTML and HTML most important differences

The Most Important Differences from HTML:

Document Structure

  • XHTML DOCTYPE is mandatory
  • The XML namespace attribute in <html> is mandatory
  • <html>, <head>, <title>, and <body> is mandatory

XHTML Elements

  • XHTML elements must be properly nested
  • XHTML elements must always be closed
  • XHTML elements must be in lowercase
  • XHTML documents must have one root element

XHTML Attributes

  • Attribute names must be in lower case
  • Attribute values must be quoted
  • Attribute minimization is forbidden