Tutorials HTML Audio & Video Tags
Ch 18 / 21 ← Prev Next →
Chapter 18 Beginner 7 min read Advanced Topics

Audio & Video Tags

HTML5 introduced native audio and video playback without plugins. Embed media directly in your pages with full browser controls.

🎯 What you'll learn
Embed videos with the <video> tag
Add audio with the <audio> tag
Use controls, autoplay, loop, muted
Provide multiple source formats
🚀
Sponsored
Learn Full-Stack Development — Join K2 Courses
Live mentoring · Real projects · Placement support · Certificate
Enroll Free
Advertisement
Google Ad — 728×90 Leaderboard

Introduction to Audio & Video Tags

This chapter covers Audio & Video Tags in depth. Understanding this topic is essential for writing clean, modern HTML. Use the live editor below to experiment as you read.

💡 In This Chapter
You will see real code examples, clear explanations, and a live editor to practice immediately — no setup needed.

Video

Embed a video.

HTML
<video src="movie.mp4" controls width="640">
  Your browser does not support video.
</video>

Audio

Embed audio.

HTML
<audio controls>
  <source src="audio.mp3" type="audio/mpeg">
  <source src="audio.ogg" type="audio/ogg">
</audio>

Try It Yourself

Edit the code below and click ▶ Run to see your changes live.

Live Editor
✎ Editor
👁 Preview
Quick Check — Chapter 18

Which attribute adds playback controls to a <video> element?

📄 Chapter Summary
  • Embed videos with the <video> tag
  • Add audio with the <audio> tag
  • Use controls, autoplay, loop, muted
  • Provide multiple source formats
💡
Sponsored
Master CSS — The Next Step After HTML
56 chapters · Flexbox, Grid, Animations · Free to start
Start CSS →
Advertisement
Google Ad — 300×250 Medium Rectangle
Join WhatsApp Channel