Caffeinated Coder
Book an appointment
Lesson 05 · First page

Images, audio and video

An HTML file is plain text, so it cannot hold a photo, a song or a film. Instead, three elements point at separate media files: <img> for pictures, <audio> for sound and <video> for moving pictures. Follow a seven-line page as the browser reads each tag, fetches the file it names and draws a picture or a player in its place. Along the way meet alt text, the controls attribute and the file formats every browser understands.

8 min9 steps5 questionsBeginner
Fig 5 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.