background preloader

HTML 5

Facebook Twitter

Mastering the HTML5 <audio> tag. Using <audio> to insert a sound file on your website Here is the most basic use of the <audio> tag: On this example it loads a mp3 file and play it. Notice the autoplay attribute which is used to play the sound automatically. That said, you shouldn’t play sounds automatically on a website: this is extremely boring for visitors. Play sound in loop Want to loop a sound? Display browser controls Instead of playing sounds automatically, which is definitely a bad practice, you should let the browser display some controls such as volume, and a play/pause button. Multiple file formats <audio> is supported by most modern browsers, but the problem is that different browsers do not support the same file format. Specify MIME types When using different file formats, it is a good practice to specify the MIME type of each file in order to help browser to localize the file they support.

Fallback for old browsers Buffer files When playing large files, it is indeed a good idea to buffer files. 23 Essential HTML 5 Resources. Editor’s Note: Bruce Lawson will be doing a 1-hour tutorial called “How to build a HTML5 Web site” at the FOWD Tour. Everyone is excited about the possibilities of HTML 5, but there’s a lot to learn and absorb as well. With that in mind, we’ve compiled a list of articles to get you started! Yes, You Can Use HTML 5 Today! – A great beginning overview of HTML 5Wikipedia: HTML 5 – A basic overview from WikipediaHTML 5 Cheat Sheet – A great quick guide to HTML 5 as a printable PDFHTML 5 Demos – A great set of demos.

People to follow These are the folks that are at the center of HTML 5 … Ian Hickson (@hixie) – Editor of HTML 5 Spec. Www.nihilogic.dk/labs/canvas_sheet/HTML5_Canvas_Cheat_Sheet.pdf. Downloads/free/html5-quick-learning-quide.pdf. Www.ibm.com/developerworks/web/tutorials/wa-html5/wa-html5-pdf.pdf. Dive Into HTML5.