Wednesday, March 7, 2018

Audio and Video Tag in html Part-2

Audio and Video Tag with attribute

Audio And Video Tag attribute list given below:

1.autoplay
2.src
3.controls
4.loop
5.muted
6.poster(only for video tag)

In Part-1, we learn the use of controls and src attribute.Today do try others

 <audio controls autoplay>
        <source src="audio.mp3"></source>
    </audio> 

if we use autoplay in audio tag,the audio file automatic play after page loading .

 <audio controls autoplay loop>
        <source src="audio.mp3"></source>
    </audio> 

if we use loop attribute in audio tag,the audio file automatic repeat again when it finish.

 <audio controls autoplay loop muted>
        <source src="audio.mp3"></source>
    </audio> 
 
 muted is use for no sound. 

autoplay, loop, and muted are same as in video tag.

only poster is different. it's use to make a cover or poster of a video like we see in youtube videos.


<video controls poster="html5.gif">
        <source src="movie.mp4" type="video/mp4">
</video>

Tag: audio and video tags with attribute, html

No comments:

Post a Comment

Freelancing Website

Top online Earning or Freelancing Website 1. https://creativemarket.com/                 Graphics and Photography Related Site ...