which is better to use: embed or audio tag? I'm using Adobe Dreamweaver CS5. and i don't know which is the best tag to use for my audio file... please explain the differences, pros and cons.
2 Answers
Certainly audio tag...
http://www.w3schools.com/html/html5_audio.asp
That's why they introduced it...
It offers audio play/pause, navigation controls, Autoplay; Looping; the best part: NO APP/PLUGIN REQUIRED!!! Lighter pages, as in no plugin.... :)
Only con: Limited audio format support as of now...
Difference: embed tag is used to embed any external object requiring plugin in your page...
audio tag is a dedicated tag for audio inclusion in your page, without plugin

- 8,461
- 6
- 37
- 49

- 1,004
- 1
- 14
- 30
Both tags are kind of new, because they were introduced by HTML5 and supported by newest versions of all major browsers. This means that there are probably no compatibility differences between them and it is best to use them in accordance with their semantic meaning and what they were meant to be used for:
- embed: The tag defines embedded content, such as a plug-in. http://www.w3schools.com/html5/tag_embed.asp
- audio: The tag defines sound, such as music or other audio streams. http://www.w3schools.com/html5/tag_audio.asp

- 1,533
- 2
- 12
- 13
-
2`embed` has been around since the 1990s. https://en.wikipedia.org/wiki/HTML_element#Previously_obsolete_but_added_back_in_HTML_5 – Olathe Apr 13 '14 at 15:19