Build an HTML Audio and Video Player - Build an HTML Audio and Video Player

Tell us what’s happening:

#The audio element should have a src attribute pointing to an audio file. I can’t seem to figure out what is the issue.

Your code so far

<!DOCTYPE html>
<html lang="en">
  <h1>The Great Sail Away</h1>
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>The Great Sail Away></title>
</head>
<body>
  <section>
    <h2>Now Playing Sailing Away</h2>
    <video width="640" controls>
 <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>Sailng Away</h2>
    <audio loop controls src="Audio for Sailing Away">
      <source src="https://cdn.freecodecamp.org/curriculum/js-music-player/we-are-going-to-make-it.mp3" type="audio/mp3">
</audio>
     </audio>
 </section>

</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36

Challenge Information:

Build an HTML Audio and Video Player - Build an HTML Audio and Video Player

Hi there and welcome to the forum!

Can you explain what is this source?

Where do I get the audio file for that. I downloaded from the example page.

It is a string:

Well, how can you get the audio from a string?

you don’t need to download it, in the instructions you are given a direct link to the file hosted on cdn.freecodecamp.org, you can use that

I got it! Thank you for the help!

1 Like