With the exception of low-quality animated GIFs and the proprietary <bgsound> tag, HTML’s native multimedia support has been limited to static images. Nearly all of the audio and video on the web has been handled by plug-ins, typically Flash or QuickTime, until now. HTML5 introduces the <audio> and <video> elements, bringing rich declarative sound and motion to our otherwise static text and graphics.

Audio and Video Basics

In their simplest forms, both new tags work like the trusty <img> tag, with a src attribute for the URL of the audio or video file respectively — except that both new tags have end tags as ...

Get HTML5 Now: A Step-by-Step Video Tutorial for Getting Started Today now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.