Build an Attractive Website Using HTML 5, CSS and JQuery.

Hi reader,how are you? I hope you are well. Today I will talk with you about HTML 5. As you may know, you can build beautiful websites using HTML 5, CSS 3 and JQuery. Flash is quite helpful and I think in near future everyone use JQuery instead flash. Here I will try to help you to learn the basic of HTML 5.
HTML5 <!DOCTYPE>
Since HTML 4 was created based on SGML so then the reference was to write DTD.But in HTML 5, it is not necessary to shown the DTD reference.

<!DOCTYPE html></div>

HTML5 <area> Tag
<img src ="planets.gif" width="145" height="126" alt="Planets" usemap ="#planetmap" />
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun" />
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury" />
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus" />
</map>

HTML5 <embed> Tag
If you want to add something such as a flash you can use this tag.

<embed src="helloworld.swf" />

HTML5 <audio> Tag
The most interesting thing is that you can play the audio on the Website without a Flash player.
<audio controls="controls">
<source src="song.ogg" type="audio/ogg" />
<source src="song.mp3" type="audio/mp3" />
Your browser does not support the audio tag.
</audio>

HTML5 Video
You can run the video player in the web page without using any software. But you can play only mp4 and ogg.

<video width="320" height="240" controls="controls">
<source src="movie.mp4" type="video/mp4" />
<source src="movie.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video>

HTML5 SVG
You can draw circle with it without CSS.
<!DOCTYPE html>
<html>
<body>
<h1>My first SVG</h1>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
   <circle cx="100" cy="50" r="50" stroke="black" stroke-width="2" fill="green" />
</svg>
</body>
</html>

CSS3 in HTML5
HTML 5 and CSS 3 is able to rotate the image.

CSS3 Example
{
transform:rotate(30deg);
}


HTML5 Drag and Drop
You can drag and drop any image in the HTML 5


HTML5 Geolocation
<script>
var x=document.getElementById("demo");
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
else{x.innerHTML="Geolocation is not supported by this browser.";}
}
function showPosition(position)
{
x.innerHTML="Latitude: " + position.coords.latitude +
"<br />Longitude: " + position.coords.longitude;
}
</script>

HTML5 Application Cache
HTML 5 also provide you the advantages of Offline Browsing.

Thanks for visiting my blog. If this post help you please put your comment.
Thanks.

No comments:

Post a Comment