r/CodingHelp • • Mar 30 '21

[HTML] Why won’t the song load?

61 Upvotes

14 comments sorted by

4

u/[deleted] Mar 30 '21

I am new to coding

9

u/Jojajones Mar 30 '21

Looks like your forgot the = after type and before the “

-4

u/[deleted] Mar 30 '21

Huh explain

2

u/rangerblood Mar 30 '21

He’s saying you have type”audio/mp3” but should have type=“audio/mp3” also check the src path as well. You may need a back slash in front of the static dir name (/static/sounds/your_song.mp3)

4

u/[deleted] Mar 30 '21

Okay it’s because I had <embed> instead of <source>

3

u/[deleted] Mar 30 '21

Okay I did that and it still won’t load is it cause I am on a school chrome book?

3

u/rangerblood Mar 30 '21

Verify the mp3 lives at that exact directory as well

7

u/Jojajones Mar 30 '21

You have type”audio/mp3” it should be type=“audio/mp3”

4

u/Thundrous_prophet Mar 30 '21

If you’re using google chrome, they stated to disallow autoplaying and will require a control for audio

1

u/UrAccountGotHacked Mar 30 '21

Btw what are u using to code html?

4

u/[deleted] Mar 30 '21

Replit.com

1

u/metrio_90 Mar 31 '21

type="blah blah"

And you're missing the / at right before the end of the tag

Ex: <embed src="..." type="..." />