HTML5 released more than a year or so, but today I find many people having difficulty (including me) and doesn't know how HTML5 can be helpful.
So here I am providing some of its tags which are used most widely and can be also be helpful to you.

These are the very basics of HTML5 and more and advanced tuts will be provided in Future.


*
*

DOCTYPE
The doctype for HTML 4.01 looks like this:

Now The doctype for HTML5 is:

It is very short indeed.

Meta Tags
If you want to specify the character encoding of a markup document, the best way is to ensure that your server sends the correct Content-Type header. The meta declaration for a document written in HTML 4.01:

_
_
In HTML5 it as simple as that:

_
_

_
_
Browsers don’t need that attribute since javascript is the only scripting language on the web(most widely used):

_
_
Similarly, no need to specify type value of “text/css” every time when a CSS file is linked:

Simply write it as:

_
_
a tags
previous format

Page


Page of HTML5.

In HTML5, it can wrapped into a single element:

Page


Page of HTML5.



_
_
Audio
Embedding an audio file in an HTML5 :

Using autoplay attribute it can be played as the site is loaded:

_
_
If you want to keep the audio playing you can use loop attribute:

If you want the controls to be shown to the users you can simply use controls attribute:
__

_
_

You can create your own controls using JavaScript use Audio API, which gives you access to methods such as play and pause and properties such as volume:


_



The autobuffer attribute has now been replaced with the preload attribute. It can take three possible values: none, auto, and metadata. Using preload="none", you can tell browsers not to pre-load the audio unless user wants it:

_
_
Video

  • It has preload attribute.
  • It has the optional autoplay and loop.
  • You can use src or source to fetch the video file.
  • You’ll have to provide dimensions to fit as you want:

You can choose a representative image for the video and tell the browser to display it using the poster attribute:

There are many video formats available so there is a need to specify which of the format you are using. So for that you can use the other apps:

We will talk about more tags and tips in the another tutorial.