From the course: Learning Web Audio and Video

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Include text elements

Include text elements

From the course: Learning Web Audio and Video

Start my 1-month free trial

Include text elements

- [Instructor] When displaying text in HTML, we have many different tags to choose from. We'll use a simple time element to display the current position and total duration of the media playback. Let's go ahead and add another line directly below our two buttons. And we'll create a container element for this of type div. And we'll give it an ID of time display. This will contain both our position and duration readouts. Let's close that out. And then nested within the time display div, we'll have our two time elements. So set that time, and we'll give this the initial value of 00:00. Since we need two time elements, we're just going to copy this one, control or command + C, add a new line, control, command + V. For each of these, we'll give them a specific ID. And for all of these different elements, the IDs are generally, so that we're able to target them through JavaScript and the media API later on. Let's name this one position display. And that's going to actually show us the…

Contents