Tell us what’s happening:
I am being told that audio element should have a src attrivute pointing to an audio file. I am not sure what I am missing.
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>HTML Audio and Video Lab</title>
</head>
<body>
<h1>HTML Video and Audio Player</h1>
<section>
<h2>Video Title</h2>
<video controls width="640">
<source src="https://cdn.freecodecamp.org/curriculum/labs/what-is-the-map-method-and-how-does-it-work.mp4"
type="video/mp4">
</video>
</section>
<section>
<h2>Audio Title</h2>
<audio controls loop>
<source src="https://cdn.freecodecamp.org/curriculum/js-music-player/sailing-away.mp3"
type="audio/mp3"
>
</audio>
</section>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Challenge Information:
Build an HTML Audio and Video Player - Build an HTML Audio and Video Player