Tell us what’s happening:
I’m having some issues with the audio and video elements and their attributes. It looks and works fine on the preview, but the tests aren’t accepting the code.
I think I’m misunderstanding how the elements are meant to be formatted, or something basic here, but I’ve looked through every forum post, re-read the theory page and tried W3/GeeksforGeeks. I even tried some of the solutions on the forums, and that worked a little (for the video element), but I still don’t understand why that helped or what it did, and that takes half of the fun of learning it out :[
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 Audio and Video Player
<!-- Section One -->
<section>
<h2> The Map Method </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"> </source>
</video>
<!-- Section Two -->
<section>
<h2> Sailing Away </h2>
<audio controls loop>
<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 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0
Challenge Information:
Build an HTML Audio and Video Player - Build an HTML Audio and Video Player