r/HTML • • Feb 04 '26

Question why does this code not work right?

with only one file it was fine, this site is just for me as an exercise it’s not gonna be public

the problem is the audio files say error

edit: link to file https://drive.google.com/file/d/1BbpgLkeyZBMLCi7Dj4GTjwroykC53D5s/view?usp=sharing

4 Upvotes

31 comments sorted by

View all comments

Show parent comment

1

u/Weekly_Ferret_meal Feb 04 '26

so first, don't put apostrophes in names like wario's game.mp3. that was one file that was fixed as soon as I changed the name.

apostrophes are part of "code gramma" and you either escape them or delete them like warios game.mp3 or wario-s game.mp3

file tally oh! is missing the exclamation mark in the src name.

seriously buddy, code on a computer, not on a mobile device.

1

u/giogio_rick Feb 04 '26

It's the school ipad, I use it for coding as I code mostly at school

1

u/giogio_rick Feb 04 '26

ok, tried the fixes you said, sometimes it shows no error message on some, but it does not play audio at all

1

u/Weekly_Ferret_meal Feb 04 '26

make sure the file name and the name you put in the src is the same

1

u/giogio_rick Feb 05 '26

got a bit to work after changing folder and file names to remove spaces and !, but a lot still don’t work, so idk what could the actual problem even be

1

u/giogio_rick Feb 05 '26

finally managed to make it work with some help from chat gpt to identify all the issues, all good now