Tell us what’s happening:
its saying my audio file doesn’t have an src value but im pretty sure it does. these lessons couldn’t be more confusing or convoluted if they tried. also had problems with the source elements because nowhere in previous lessons did they go over them even in the “working with audio and video elements” theory did it cover them correctly. really wish they would just teach me the correct way to implement code instead of me spending 2 hours googleing how to do it correctly.
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>title of page</h1>
<section>
<h2>title of video</h2>
<video
controls
loop
muted
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>
<section>
<h2>song name</h2>
<audio
controls
loop>
<source src="https://cdn.freecodecamp.org/curriculum/js-music-player/sailing-away.mp3" type=audio/mp3>
</source>
</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/142.0.0.0 Safari/537.36
Challenge Information:
Build an HTML Audio and Video Player - Build an HTML Audio and Video Player
You did the video element correctly. You can use that as a template.
Make sure you have quotes around all of the values for the attributes.
If you want to continue learning programming, get used to this. You should be looking up other resources like this when you feel you need to.
Look at the example audio elements you were given here: https://www.freecodecamp.org/learn/responsive-web-design-v9/lecture-working-with-audio-and-video-elements/what-are-the-roles-of-the-html-audio-and-video-elements
Specifically note this in the instructions
you should have an audio element with the controls and loop attributes, and a src attribute that points to an audio file
Is the src on the audio element itself?
Note - while frustrating, this is a lot of the job of being a progammer
if im supposed to spend hours looking up the correct way to implement code…..why am i even here? i thought this course was supposed fully to teach me everything i needed to know about html. is this course only for people who already have an extensive background and understanding of html and are just trying to get the certification because thats kinda how it feels?
Nope
Ideally, no, you should not spend hours researching for HTML. Ideally you would do some research and debugging and then ask for help if you are stuck. The exact point of when to reach out for help varies for each person though.
A single course will never teach you everything, unfortunately. Programming is fundamentally always changing and too big to hold in one person’s brain, so constant research and learning is needed.