HTML5 Audio and Video

  • Previously, we used <object> and <embed> tags
  • No need to worry about plugins like Flash.

HTML5 Audio is supported with the following tag:

<audio controls="controls">
    <source src="audiofile.mp3" type="audio/mp3" />
    <source src="audiofile.ogg" type="audio/ogg" />
    Your browser does not support the <audio> tag.
</audio>

HTML5 Video is supported with the following tag:

<video controls="controls" width="400" height="300">
    <source src="videofile.mp4" type="audio/mp4" />
    <source src="videofile.ogg" type="audio/ogg" />
    Your browser does not support the <video> tag.
</video>

About the Author

aditya bajaj
Music and Blogging get my love.

Be the first to comment on "HTML5 Audio and Video"

Leave a comment

Your email address will not be published.


*