Can audio code like this? html5 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can audio code like this? html5

<audio src="test1.mp3", src="test2.mp3">error message</audio> I know that there is <audio control><source src="test1.mp3"… you get my point But is the first one correct? If not how to change it?

25th Nov 2020, 2:55 PM
Jonas
Jonas - avatar
4 Answers
+ 2
the first one is wrong, one audio element can have one src attribute only. In DOM tree, each attribute is a property of that element. So, the later one will overwrite the previous one.
25th Nov 2020, 3:20 PM
Gordon
Gordon - avatar
+ 1
Please don't ask the same question 2 times. Someone answered your previous question
25th Nov 2020, 2:59 PM
Andrei I
Andrei I - avatar
0
I am sorry but i dont think so i asked the same question. Both questions are different
25th Nov 2020, 3:08 PM
Jonas
Jonas - avatar
0
Thanks so much. I understand now.
25th Nov 2020, 3:27 PM
Jonas
Jonas - avatar