Audio and Video
HTML provides native <audio> and <video> elements. The controls attribute exposes browser-provided playback controls. Multiple <source> elements can provide alternative media formats.
Video
<video controls width="800" poster="preview.jpg">\n <source src="lesson.mp4" type="video/mp4">\n <source src="lesson.webm" type="video/webm">\n Your browser does not support HTML video.\n</video>💡 The browser can choose a supported source. The fallback text provides information when video is unavailable.
Key Takeaways
- HTML supports native audio and video playback.
- Multiple source formats can improve compatibility.
Knowledge Check
Which attribute displays native video controls?