Monday, 13 February 2017

HTML 5 SVG

SVG is a standard for drawing shapes in browsers. However, SVG is at a fundamentally higher level because each drawn shape is remembered as an object in a scene graph or DOM, which is subsequently rendered to a bit map. This means that if attributes of an SVG object are changed, the browser can automatically re-render the scene.
SVG images are represented in XML, and complex scenes can be created and maintained with XML editing tools

HTML 5 Audio

In HTML 4 audio was play using any plugin like flash or Microsoft silver light but in HTML 5 audio player is updated so no need to install any other plugin browser automatically plays it.

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

HTML 5 Video

Video is new tag added in HTML 5. The controls attribute adds video controls, like play, pause, and volume. It is a good idea to always include width and height attributes. If height and width are not set, the page might flicker while the video loads and video will in its original resolution and if resolution is high or HD it will disturb all other element position of your page.

Syntax :


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

HTML 5 Form

HTML 5 Form New Element Example

Form is   use to collect data from user. HTML 5 add some new control which helps and minimize your coding for date,time,email etc input. In following code I have differentiate HTML 4 and HTML 5 control sperately.

<!DOCTYPE html>
<html>

   <head>
      <meta charset="utf-8">
      <title>HTML5 Form Tutorial</title>
   </head>
      <h1 align="center">Girfa : Student Help Form New Element</h1><hr>
   <body>