Coding task · HTML and CSS course · Module 2: The Web and HTML Elements
Embedding Video and Audio in HTML
The <video> tag embeds video, and <audio> embeds sound. The controls attribute adds playback buttons. The <source> element defines the file and its format. The loop, muted, and autoplay attributes control behavior.
Task
Create a page with a <video> and <audio> element. The video should have controls, width, and height attributes, with a <source> element inside of type video/mp4. The audio should have a controls attribute and a <source> of type audio/mpeg.