Posted By

apphp-snippets on 03/11/13


html code media

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Media Code in HTML5

 / Published in: HTML


This example is a basic design structure for loading multiple video and audio formats for universal work of media content on your page.

  1. <video poster="images/preview.png" width="800" height="600" controls="controls" preload="none">
  2. <source src="media/my_video.mp4" type="video/mp4"></source>
  3. <source src="media/my_video.webm" type="video/webm"></source>
  4. <source src="media/my_video.ogg" type="video/ogg"></source>
  5. </video>
  6. <audio controls="controls" preload="none">
  7. <source src="audio/my_music.ogg" type="audio/ogg">
  8. <source src="audio/my_music.mp3" type="audio/mpeg">
  9. </audio>

Report this snippet  

You need to login to post a comment.