Results 1 to 2 of 2

Thread: How do you attach audio to an image

  1. #1
    Join Date
    Apr 2012

    How do you attach audio to an image

    Using XHTML or HTML5 (whichever is easiest) I'd like to attach an audio file to an image so that when I click on the image, the audio file plays once and then stops. I would rather not have controls visible if possible.

    I know how to map an image using usemap/<area>. I think I know how to do onmouse events. But I can't figure out how to associate an action to either of the two. The instruction I have uses <audio>..</audio> and that's about it.

    I don't have the foggiest as to how to do this. Can anyone help?


  2. #2
    Join Date
    Nov 2002

    It looks to be HTML 5. Looks like in Chrome at least if I get rid of the control attribute I can't get any CSS to display. If the attribute is there, I can at least color the controls and such.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles