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>
<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>
<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>
<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>
No comments:
Post a Comment