Junior JavaScript

What is the <audio> and <video> tag used for?

They let you embed audio and video files directly in HTML without plugins like Flash.

Example:

<audio controls>

<source src="music.mp3" type="audio/mpeg">

</audio>

<video controls width="320">

<source src="movie.mp4" type="video/mp4">

</video>

Follow me on LinkedIn:

Key Takeaway:

HTML5 makes multimedia playback native, fast, and accessible.

More from JavaScript Tutorial

All questions for this course