HTML - Basic HTML Part 5

May 4, 2026 3:00pm UTC (Check your timezone)

Theory Workshop Lab

Instructors: Jess, Carmen, and Eda

Basic HTML

Download iCal File

Before this session, please:

During this session, we’ll:

After this session, please:

Instructor notes

Working with Audio and Video Elements: What Are the Roles of the HTML Audio and Video Elements, and How Do They Work?

So far we’ve worked with text, images, and links. Today we add sound and moving pictures to the toolkit.

Audio element: an HTML element used to embed sound content on a web page. The most basic version looks like this:

1<audio src="song.mp3" controls></audio>

Video element: an HTML element used to embed a video on a web page. The most basic version looks like this:

1<video src="movie.mp4" controls></video>

The two elements are very similar in how they work. They share most of the same attributes, and the main difference is just whether they show a visual playback area or not.

Common attributes (these work on both <audio> and <video>):

Video-only attributes:

Multiple sources: instead of using a single src attribute, you can put multiple <source> elements inside the audio or video element. This lets you offer the same media in different file formats so the browser can pick whichever one it can play.

1<video controls>
2  <source src="movie.mp4" type="video/mp4" />
3  <source src="movie.webm" type="video/webm" />
4  Your browser does not support the video element.
5</video>

The text between the opening and closing tags is fallback content. It only shows up if the browser can’t play any of the sources, which is rare these days but still good practice.

Questions:

Build an HTML Music Player

This workshop focuses on the audio element. You’ll build a small music player from scratch and get hands-on practice with the attributes from the reading.

A few things to keep in mind as you go:

Build an HTML Video Player

This is the video equivalent of the music player workshop. Most of what you learned in the audio one applies here too, with a few extras.

Things to watch for:

Build an HTML Audio and Video Player

This is the lab that combines everything from today. You’ll build a single page that includes both an audio player and a video player. We’ll talk through it together so you have a clear sense of what’s needed before you finish it on your own over the next few days.

A few general tips: