New media tags in HTML5

New media tags in HTML5

PONRAM's picture

Some new media elements were intoduced in HTML5 where the developer can simply plug and play the media elements by simply using the below tags

<audio> Defines sound content

<video> Defines a video or movie

<source> Defines multiple media resources for <video> and <audio>

<embed> Defines a container for an external application or interactive content (a plug-in)

<track> Defines text tracks for <video> and <audio>

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Ahmed Ibrahim Nagi Ali's picture

Try share the code with us

Ahmedelshfie
PONRAM's picture

may i know what kind of codes you need. can you please tell in detail

PONRAM's picture

<audio src="audio/sample.mp3" autoplay> </audio>

or

play a simple song

<audio controls>
  <source src="horse.ogg" type="audio/ogg">
  <source src="horse.mp3" type="audio/mpeg">
  Your browser does not support the audio tag.
</audio>

or

<audio src="data:audio/mpeg,ID3%02%00%00%00%00%..." autoplay> </audio>

Ahmed Ibrahim Nagi Ali's picture

well, could you explain more clearly

Ahmedelshfie
PONRAM's picture

no ! cant give more detail than this post

nakhli  m.'s picture

can you give an example for tag <embed>

PONRAM's picture

example for embed tag <embed src="ponram_workout.swf">

PONRAM's picture

Some of parameters that can be used along with <embed>

height - Specifies the height of the embedded content

src - Specifies the address of the external file to embed

type - Specifies the MIME type of the embedded content

width - Specifies the width of the embedded content

Login to leave a comment.