开发者

HTML audio and embed Tag

开发者 https://www.devze.com 2023-03-17 17:54 出处:网络
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 an

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
0

精彩评论

暂无评论...
验证码 换一张
取 消