HTML vs HTML5



HTML vs HTML5:-

HTML or Hyper-Text Markup Language can be referred to as the Worldwide Web’s primary language. HTML has seen many updates over time, and currently, the newest HTML version is HTML5. Some of the major differences between the two versions are:
  • HTML5 supports both audio and video whereas none of these was a part of HTML
  • HTML does not allow JavaScript to run within the web browser whereas HTML5 provides full support for JavaScript to run in the background.
  • In HTML5, inline MathML and SVG can be used in text whereas this wasn’t possible in HTML.
  • HTML5 supports new kinds of form controls, for example: dates and times, email, number, range, tel, url, search etc.
  • There are many new elements introduced in HTML5. Some of the most important ones are: summary, time, audio, details, embed, figcaption, figure, footer, header, article, canvas, nav, output, section, source, track, video, etc..

Other main differences are:-

  • Doctype declaration: In HTML,it is too longer as compared to that in HTML5
    • HTML:
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    • HTML5 :
  1. <!DOCTYPE html>
  • Character encoding: in HTML,it is more complex as compared to that in HTML5
    • HTML:
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    • HTML5:
  1. <meta charset="UTF-8">
  • Vector Graphics:
    • HTML: Vector Graphics is possible with the help of technologies such as VML, Silverlight, Flash etc
    • HTML5: Vector graphics is integral part of HTML5 e.g. SVG and canvas
  • Shapes:
    • HTML: Not possible to draw shapes like circle, rectangle, triangle.
    • HTML5: You can draw shapes like circle, rectangle, triangle.
  • Storage:
    • HTML: use cookies
    • HTML5: use local storage instead of cookies

Post a Comment

0 Comments