Next Generation of HTML - HTML5

HTML 5

  
Html 5 is next generation of HTML and it's defined by W3C. HTML5 introduces a number of new elements and attributes that reflect typical usage on modern websites. Some of them are replacements for common uses of generic block (<div>) and inline (<span>) elements, for example <nav> (website navigation block), <footer> (usually referring to bottom of web page or to last lines of HTML code), or <audio> and <Video>instead of <object>.
 

Features

 
Some of the most interesting new features in HTML5:
  • The canvas element for drawing
  • The video and audio elements for media playback
  • Better support for local offline storage
  • New content specific elements, like article, footer, header, nav, section
  • New form controls, like calendar, date, time, email, URL, search

Browser Support

 
HTML5 is not yet an official standard and no browsers have full HTML5 support.
 
But all major browsers (Safari, Chrome, Firefox, Opera, Internet Explorer) continue to add new HTML5 features to their latest versions.
 
Following are some examples of new attributes in HTML5
 
Code example of <Video> tag :
  1. <!DOCTYPE HTML>  
  2. <html>  
  3.     <body>  
  4.         <video width="320" height="240" controls="controls">  
  5.             <source src="movie.ogg" type="video/ogg" />  
  6.             <source src="movie.mp4" type="video/mp4" />  
  7. Your browser does not support the video tag.  
  8.         </video>  
  9.     </body>  
  10. </html>  
Code example of <Audio> tag :
  1. <audio controls="controls">  
  2.     <source src="horse.ogg" type="audio/ogg" />  
  3.     <source src="horse.mp3" type="audio/mp3" />  
  4.   Your browser does not support the audio element.  
  5. </audio>  
Code example of <footer> tag :
  1. <!DOCTYPE HTML>  
  2. <html>  
  3.     <body>  
  4.         <footer>Copyright© reserved</footer>  
  5.     </body>  
  6. </html>  
Code example of < canvas > tag :
  1. <canvas id="myCanvas" width="200" height="100"></canvas>  
HTML 5 improves interoperability, and reduces development costs, by making precise rules on how to handle all HTML elements, and how to recover from errors.