HTML audio and embed Tag
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.
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
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
精彩评论