Receive all updates via Facebook. Just Click the Like Button Below

Blogger Widgets
/

Watch Intro About My Website ! ! !

Monday 16 December 2013

Watch this video to know about how to hide the folder using command prompt
It's Really amazing !!!!

Saturday 9 November 2013


The canvas element has no drawing abilities of its own. All drawing must be done inside a JavaScript:

Example Program:

<!DOCTYPE html>
<html>
<body>

<canvas id="myCanvas" width="200" height="100"
style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>

<script type="text/javascript">
var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.fillStyle="#FF0000";
cxt.fillRect(0,0,150,75);
</script>

</body>
</html>

JavaScript uses the id to find the canvas element:

var c=document.getElementById("myCanvas");

Then, create a context object:

var cxt=c.getContext("2d");

The getContext("2d") object is a built-in HTML5 object, with many methods to draw paths, boxes, circles, characters, images and more.

The next two lines draws a red rectangle:

cxt.fillStyle="#FF0000";
cxt.fillRect(0,0,150,75);

The fillStyle method makes it red, and the fillRect method specifies the shape, position, and size.




What is Canvas?

The HTML5 canvas element uses JavaScript to draw graphics on a web page.

A canvas is a rectangular area, and you control every pixel of it.
The canvas element has several methods for drawing paths, boxes, circles, characters, and adding images.

Create a Canvas Element

Add a canvas element to the HTML5 page.

Specify the id, width, and height of the element:

<canvas id="myCanvas" width="200" height="100"></canvas>

Friday 8 November 2013


HTML5 provides a standard for playing audio.

Until now, there has never been a standard for playing audio on a web page.

Today, most audio are played through a plugin (like flash).

However, not all browsers have the same plugins.

HTML5 specifies a standard way to include audio, with the audio element.

The audio element can play sound files, or an audio stream.

Audio Formats
Currently, there are 3 main formats for the audio element:

Format
IE 9
Firefox 3.5
Opera 10.5
Chrome 3.0
Safari 3.0
Ogg Vorbis
No
Yes
Yes
Yes
No
MP3
Yes
No
No
Yes
Yes
Wav
No
Yes
Yes
Yes
Yes

How It Works:

To play an audio file in HTML5, this is all you need:

<audio src="song.ogg" controls="controls">
</audio>

The control attribute is for adding play, pause, and volume controls.

Insert content between the <audio> and </audio> tags for browsers that do not support the audio element:

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



The example above uses an Ogg file, and will work in Firefox, Opera and Chrome.

To make the audio work in Internet Explorer and Safari, add an audio file of the type MP3.

The audio element allows multiple source elements. Source elements can link to different audio files. 

The browser will use the first recognized format:

Example
<audio controls="controls">
  <source src="song.ogg" type="audio/ogg" />
  <source src="song.mp3" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>



HTML5 audio Tags

Tag
Description
Defines sound content
Defines multiple media resources for media elements, such as <video> and <audio>


Video on the Web
Until now, there has never been a standard for showing video on a web page.

Today, most videos are shown through a plugin (like flash). 

However, not all browsers have the same plugins.

HTML5 specifies a standard way to include video, with the video element.

Video Formats
Currently, there are 3 supported video formats for the video element:

How It Works

Format
IE
Firefox
Opera
Chrome
Safari
Ogg
No
3.5+
10.5+
5.0+
No
MPEG 4
9.0+
No
No
5.0+
3.0+
WebM
No
4.0+
10.6+
6.0+
No
  • Ogg = Ogg files with Theora video codec and Vorbis audio codec
  • MPEG4 = MPEG 4 files with H.264 video codec and AAC audio codec
  • WebM = WebM files with VP8 video codec and Vorbis audio codec
To show a video in HTML5, this is all you need:

<video src="movie.ogg" controls="controls"></video>

The control attribute is for adding controls: play, pause, and volume.

It is also a good idea to always include width and height attributes.

You should also insert text content between the <video> and </video> tags for browsers that do not support the video element:

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



The example above uses an Ogg file, and will work in Firefox, Opera and Chrome.

To play the video in Internet Explorer, Safari and Chrome, we must add an MPEG4 file.

The <video> element allows multiple <source> elements. <source> elements can link to different video files. 

The browser will use the first recognized format:

Example
<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 video Tags

Tag
Description
Defines a video or movie
Defines multiple media resources for media elements, such as <video> and <audio>
Defines text tracks used in mediaplayers


The internet has changed a lot since HTML 4.01 became a standard in 1999.

Today, some elements in HTML 4.01 are obsolete, never used, or not used the way they were intended to. These elements are deleted or re-written in HTML5.

To better handle today's internet use, HTML5 also includes new elements for better structure, drawing, media content, and better form handling.

New Markup Elements

New elements for better structure:
Tag
Description
<article>
Specifies independent, self-contained content, could be a news-article, blog post, forum post, or other articles which can be distributed independently from the rest of the site.
<aside>
For content aside from the content it is placed in. The aside content should be related to the surrounding content
<bdi>
For text that should not be bound to the text-direction of its parent elements
<command>
A button, or a radiobutton, or a checkbox
<details>
For describing details about a document, or parts of a document
<summary>
A caption, or summary, inside the details element
<figure>
For grouping a section of stand-alone content, could be a video
<figcaption>
The caption of the figure section
<footer>
For a footer of a document or section, could include the name of the author, the date of the document, contact information, or copyright information
<header>
For an introduction of a document or section, could include navigation
<hgroup>
For a section of headings, using <h1> to <h6>, where the largest is the main heading of the section, and the others are sub-headings
<mark>
For text that should be highlighted
<meter>
For a measurement, used only if the maximum and minimum values are known
<nav>
For a section of navigation
<progress>
The state of a work in progress
<ruby>
For ruby annotation (Chinese notes or characters)
<rt>
For explanation of the ruby annotation
<rp>
What to show browsers that do not support the ruby element
<section>
For a section in a document. Such as chapters, headers, footers, or any other sections of the document
<time>
For defining a time or a date, or both
<wbr>
Word break. For defining a line-break opportunity.

New Media Elements
HTML5 provides a new standard for media content:
Tag
Description
<audio>
For multimedia content, sounds, music or other audio streams
<video>
For video content, such as a movie clip or other video streams
<source>
For media resources for media elements, defined inside video or audio elements
<embed>
For embedded content, such as a plug-in
<track>
For text tracks used in mediaplayers

The Canvas Element
The canvas element uses JavaScript to make drawings on a web page.
Tag
Description
<canvas>
For making graphics with a script

New Form Elements
HTML5 offers more form elements, with more functionality:

Tag
Description
<datalist>
A list of options for input values
<keygen>
Generate keys to authenticate users
<output>
For different types of output, such as output written by a script

New Input Type Attribute Values
Also, the input element's type attribute has many new values, for better input control before sending it to the server:


Type
Description
tel
The input value is of type telephone number
search
The input field is a search field
url
The input value is a URL
email
The input value is one or more email addresses
datetime
The input value is a date and/or time
date
The input value is a date
month
The input value is a month
week
The input value is a week
time
The input value is of type time
datetime-local
The input value is a local date/time
number
The input value is a number
range
The input value is a number in a given range
color
The input value is a hexadecimal color, like #FF8800
placeholder
Specifies a short hint that describes the expected value of an input field
Related Posts Plugin for WordPress, Blogger...