HTML5 « Intelligrape Groovy & Grails Blogs

Posts Tagged ‘ HTML5 ’

HTML5 Offline Applications – IndicThreads Conference PPT

Posted by on October 31st, 2012

Hi,

 

Recently i presented in “IndicThreads 2012″ conference on the topic “HTML 5 Offline Applications”.

 

You can view the slides at Slideshare at: http://www.slideshare.net/kushallikhi/indic-threads-delhisessionhtml5-offline-applications

 

Topics which are discussed in this presentation are:

  1. Desktop Vs Web(HTML 4)
  2. Desktop Vs HTML4 Vs HTML5
  3. Why Offline Apps
  4. Why Local Storage of Data
  5. Type Of Caches
  6. The Manifest File (Resources Cache)
  7. Invalidating The Manifest
  8. DOM Events for Offline cache
  9. Debugging
  10. Local Storage vs Session Storage vs WebSQL vs Indexed Storage vs File System

 

Hope it is useful.
Regards
Kushal Likhi

Posted in HTML-UI-CSS

Placeholder in html5

Posted by on May 15th, 2011

HTML5 has made the page designing an easy task. Placeholder is input field improvement in html5. Things that we were doing in past using combination of HTML and client side scripting language can be done in HTML5 using an attribute. One of the example is placeholder attribute used with input type text which automatically puts the placeholder attribute value in the text field if it is empty. This placeholder text is cleared automatically on focus and on focus out either the entered text or the placeholder value (if nothing was entered) is displayed.

html form

<form>
<code>
  <input name="fieldname" placeholder="Enter any keyword">
  <input type="submit" value="Search">
</code>
</form>

Support browser

IE Firefox Safari Chrome Opera
. 3.7+ 4.0+ 4.0+ 11.0+

Audio html5

Posted by on January 16th, 2011

Audio tag is a html 5 element. You can play audio file on web page without any third party plug-in. This will work only on html5 compliant browser.

Flash player is widely used to play audio and video files on web. There are some third party plug-ins likes Flash Player, QuickTime, Real Player etc available for this. The main disadvantage of Third party plug-ins is that we need to download client side browser.

Audio tag is embeded in HTML:

<audio src="audio.ogg" controls="controls">
Your browser does not support the audio element.
</audio>

Use Attribute in audio tag

Attribute Value Description
autoplay autoplay The start playing audio.
controls controls Controls is display as a play
button.
loop loop The audio will start over again, whenis finished.
preload auto
metadata
none
Audio should be loaded when the page
loads.
src url Defines the URL of the audio to play

Support browser

Browser
FireFox 3.6+
Safari 5+
Chrome 6
Opera 10.5+
IE 9(beta)



Umar Pahat
Umar [at] intelligrape [dot] comAudio tag is a html 5 element. You can play audio file on web page without any third party plug-in. This we work only on html5 compliant browser support.

Tags: ,
Posted in HTML-UI-CSS

canvas

Posted by on September 7th, 2010

The HTML <canvas> tag is used for creating graphics on the fly. It can be used for rendering graphs, game graphics, or other visual images.

 

To draw on the canvas, the <canvas> tag is used in conjunction with the getContext(contextId) method.

 

Any content between the <canvas></canvas> tags is “fallback content”- meaning, it will be displayed only if the canvas cannot be displayed.

 

As a script:

function displayCanvas()
	{
      var canvas = document.getElementById("myCanvas");
      if (canvas.getContext) {
        var ctx = canvas.getContext("2d");

        ctx.fillStyle = "rgb(200,0,0)";
        ctx.fillRect (0, 0, 150, 75);

        ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
        ctx.fillRect (40, 30, 125, 75);

        ctx.fillStyle = "rgb(0,0,150)";
        ctx.strokeRect (20, 20, 50, 100);
      }
    }

 

and this is html

<canvas id="myCanvas" width="300" height="200">Your browser does not support the canvas tag. At the time of writing, Firefox, Opera, and Chrome support this tag.

Here's an image of what it's supposed to look like image.
</canvas>

Attributes
width: {Specifies the canvas width in pixels. The default value is 300.Possible values:[Non-negative integer] (for example, 300)}
Height: {Specifies the canvas height in pixels. The default value is 150.Possible values:[Non-negative integer] (for example, 150)}

Posted in HTML-UI-CSS