Jump to content

Picture with mp3 file


jamesadrian
 Share

Recommended Posts

I would like to put a png picture together with an mp3 sound file on an HTML page so that the visitor to the page can choose to hear the sound file while looking at the picture.  I think I one knew, but I forgot. Is there a tutorial I can look at?  I have a lot of experience making web pages that have mostly text and pictures.

Thank you for your help.

 

Jim Adrian

 

 

Link to comment
Share on other sites

I have a problem with the code in Safari but not in Frefox.  It does not always show a volume control in Safari.  It may be that now it never does.  I have been changing small details.  What determines the appearance of a volume control?  This is the code now:

<div style="position: absolute; top: 100px; left: 30px;">

<audio controls>
  <source src="https://www.futurebeacon.com/JA3.mp3" type="audio/mp3">
  <source src="https://www.futurebeacon.com/JA3.ogg" type="audio/ogg">
  <p>Your browser doesn't support HTML5 audio.</p>
</audio>

</div>

Thank you for your help.

 

Jim Adrian

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...