Table of contents
Defination of Audio Tag
the Audio tag <audio> tag is used to embeded a sound content in a document, such as music and other audio streams.
the text between the <audio> and </audio> tag will only be displayed in browsers that do not support the <audio> element.
- there are three supported audio formats in HTML:MP3,WAV, OGG
<!DOCTYPE HTML>
<html>
<body>
<audio controls autoplay>
<source src = "/html5/audio.ogg" type = "audio/ogg" />
<source src = "/html5/audio.wav" type = "audio/wav" />
Your browser does not support the <audio> element.
</audio>
</body>
</html>
Defination of Video Tag
the <Video> tag is used to embed video content in a document, such as a movie clip or other video streams.
the <video> tag contains one or more <source> tag with the diffrent video sources
the browser will choose the first source it supports.
the text between the <video> and </video> tag will only be displayed in browsers that do not support the <video> element.
there are three supported video formats in HTML: MP4 ,WebM,OGG
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
conclusion
the audio and video tag is used in HTML for streaming audio and video files such as movies clip , audio clip etc