HTML5 TAG



HTML5 New Media Elements
 Tag
Description
  Defines sound or music content
  Defines video or movie content
  Defines sources for
  Defines tracks for
 Defines containers for external applications (like plug-ins)

The
The audio tag allows you to put a music file directly into the HTML code without the use of a plugin, such as Flash or Javascript. There are three types of audio formats that are compatible with this tag: .ogg, .mp3 and .wav. However, some of these file types will only work with certain browsers. Here is a handy chart to show you which files are compatible with each browser.

IE
Firefox
Opera
Chrome
Safari
OGG
No
3.5+
10.5+
3.0+
No
MP4
9.0+
No
No
3.0+
3.0+
WAV
No
3.5+
10.5+
No
3.0+
Take care when using this tag! Make sure that the audio is not set to auto-play, or even auto-load – Give the user the choice of visiting your website in silence. Also, don’t make the music excessively loud. JUST LIKE IF I WERE TO WRITE THIS WHOLE ARTICLE IN CAPITAL LETTERS, IT WOULD TURN YOU OFF READING THE REST OF IT. (But, please keep on reading. I won’t do that again.)
One possible use of this tag could be for bands who want to get their music known, so they stick it up on an HTML5 compatible website.
HTML5 supports
    Your browser does not support the
The current HTML5 draft specification does not specify which audio formats browsers should support in the audio tag. But most commonly used audio formats are ogg, mp3 and wav.
You can use tag to specify media along with media type and many other attributes. An audio element allows multiple source elements and browser will use the first recognized format:
  
      
       yourfolder/audio.wav" type="audio/wav" />
       Your browser does not support the
  
Audio Attribute Specification:
The HTML5 audio tag can have a number of attributes to control the look and feel and various functionalities of the control:
Attribute
Description
autoplay
This boolean attribute if specified, the audio will automatically begin to play back as soon as it can do so without stopping to finish loading the data.
autobuffer
This boolean attribute if specified, the audio will automatically begin buffering even if it's not set to automatically play.
controls
If this attribute is present, it will allow the user to control audio playback, including volume, seeking, and pause/resume playback.
loop
This boolean attribute if specified, will allow audio automatically seek back to the start after reaching at the end.
preload
This attribute specifies that the audio will be loaded at page load, and ready to run. Ignored if autoplay is present.
src
The URL of the audio to embed. This is optional; you may instead use the element within the video block to specify the video to embed

The
One of the more exciting tags is the video tag. There has never before been a standard for video formats on the web. HTML5 is going to change all that.
Again, there are only three video formats that are supported with the

IE
Firefox
Opera
Chrome
Safari
OGG
No
3.5+
10.5+
5.0+
No
MP4
9.0+
No
No
5.0+
3.0+
WebM
No
No
10.6+
6.0+
No
As opposed to what I had said about the tag, you could should set the tag to auto play for the video. The only caveat is that you must start the video in mute (explained below), or at least in a low volume. At least the user will have a visual warning before the sound starts. You could even start the video off in muted audio if you want.
The only problem that I can see with this tag is if the video file is too large. Due to people wanting immediate action whenever they arrive onto a site. They don’t want to be waiting for 3 minutes, they could get bored of waiting and end up skipping the video altogether.
One possible use of this tag would src=”http://speckyboy.com/wp-content/uploads/2011/04/. You could make a nice Flash animation, render it as a MPEG4 and set it to autoplay on one of your clients’ sites.

Embedding Video:

Here is the simplest form of embedding a video file in your webpage:
width="300" height="200" controls>
    Your browser does not support the 
The current HTML5 draft specification does not specify which video formats browsers should support in the video tag. But most commonly used video formats are:
1.      Ogg: Ogg files with Thedora video codec and Vorbis audio codec.
2.      mpeg4: MPEG4 files with H.264 video codec and AAC audio codec.
You can use tag to specify media along with media type and many other attributes. A video element allows multiple source elements and browser will use the first recognized format:
   width="300" height="200" controls autoplay>
       yourfolder/foo.ogg" type="video/ogg" />
       yourfolder/foo.mp4" type="video/mp4" />
       Your browser does not support the 
   
Video Attribute Specification:
The HTML5 video tag can have a number of attributes to control the look and feel and various functionalities of the control:
Attribute
Description
autoplay
This boolean attribute if specified, the video will automatically begin to play back as soon as it can do so without stopping to finish loading the data.
autobuffer
This boolean attribute if specified, the video will automatically begin buffering even if it's not set to automatically play.
controls
If this attribute is present, it will allow the user to control video playback, including volume, seeking, and pause/resume playback.
height
This attribut specifies the height of the video's display area, in CSS pixels.
loop
This boolean attribute if specified, will allow video automatically seek back to the start after reaching at the end.
preload
This attribute specifies that the video will be loaded at page load, and ready to run. Ignored if autoplay is present.
poster
This is a URL of an image to show until the user plays or seeks.
src
The URL of the video to embed. This is optional; you may instead use the element within the video block to specify the video to embed
width
This attribut specifies the width of the video's display area, in CSS pixels.


Comments

Popular posts from this blog

Basic concepts of flexbox

CSS Tricks

WHY TO USE HTML5