Audio AutoPlay
I'm just getting into HTML, and finally got to the HTML5 part of the course and I've finally run into a problem I couldn't get the solution from the comments. I am simply trying to make the song autoplay when the page is opened. At first I added the audio to the website using <audio src="audio.mp3" controls> </audio> Which it ran fine and I was able to use it without a hitch. So I decided to use a different way as stated in the lesson <source src="audio.mp3" type="audio/mpeg"> Audio element not supported by your browser. </audio> For some reason however, this way via source src does not work? It displays on the webpage as an audio file is there, however the time listed for the song is stated 0:00/0:00 Weirdly enough I decided to just keep moving on with <audio src=> and see if this is just a better way to do it, but by adding autoplay to <audio src="audio.mp3" controls autoplay> I was not able to get the page to play it automatically. As well as I have tried this with source as well but it still lists the song as 0:00. Is there something I am doing wrong here? At the moment I don't believe I would actually use autoplay for anything on something I would create in the future, but I just really would like to understand the fundamentals of getting it to work so that I can say I understand it. Thank you in advance to anybody that offers their advice!