You can use the <audio> tag to embed audio files in your HTML page:
<audio controls>
<source src="audiofile.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
You can use the <video> tag to embed video files in your HTML page:
<video width="600" controls>
<source src="videofile.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Provide multiple formats for better browser support:
<audio controls>
<source src="sound.ogg" type="audio/ogg">
<source src="sound.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
<video width="600" controls>
<source src="movie.webm" type="video/webm">
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
autoplay: Start the media automatically when the page loads.loop: Play the media file repeatedly.muted: Mute the audio by default.poster (for video): Show an image before the video starts.Example using optional attributes:
<video width="600" controls autoplay loop muted poster="thumbnail.jpg">
<source src="video.mp4" type="video/mp4">
</video>