Sorry, I had a feeling I should have added it, but wasn’t sure how this website even works. I don’t have a Codepen, i don’t know what that even is. I’m new to all of this. My code doesn’t show on the website unfortunately. I have some h1 tags in my code and it just pops up as the actual tag rather than code unfortunately…
Where are you writing your code, out of curiosity? CodePen is the site FCC used to endrose for the front-end projects. It has useful things like syntax highlighting, error messages, and a preview that updates as you type. I would hazard a guess that your h1 tags have syntactical errors (like a missing < or / mark), so they’re being rendered as plain text.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
your play() method doesnt do anything. You gotta explicitly tell play() what it should do whenever its’s being called. maybe it can change an attribute in your audio tag or something.
Hi, sound3 to sound7 are undefined. In the html code there is only the source element but not the audio one. Also the closing tag of the body is missing.
You’d also want to put your js code in the window.onload function so that is fires only when all the content of the page is loaded.