Audio and Video

Using HTML5 makes both <audio> and <video> ridiculously easy to incorporate into your page. Both the <audio> and <video> elements specify a standard way to embed audio/video without undue complications. You use the <audio> and <video> elements the same way you would use any other element (be sure you don’t forget to include some sort of “your browser does support…” text as back up).



This is an example of of embeding a YouTube video into your website. Instead of using the <video> tag, I used an <iframe> and used the embed code provided by YouTube.

Here is the code: <iframe width="560" height="315" src="" frameborder="0" allowfullscreen</iframe>


This is an example of how ridiculously easy it is to use an audio tag.

Here is the code: <audio controls> <source src="media/Early_One_Morning_1.ogg" type="audio/ogg"> <source src="media/Early One Morning_1.mp3" type="audio/mpeg"> Your browser hates super fun audio time. </audio>


Hover over the animals below: