HTML Audio and Video
HTML provides elements for embedding audio and video content directly into web pages. The <audio> and <video> elements can be used to embed audio and video content, respectively.
Here's an example of embedding a video into an HTML page:
html
<video controls>
<source src="my-video.mp4" type="video/mp4">
<source src="my-video.webm" type="video/webm">
Your browser does not support the video tag.
</video>
In this example, the <video> element contains two <source> elements, each with a different source file and MIME type. The controls attribute adds playback controls to the video player, and the fallback text "Your browser does not support the video tag." is displayed if the browser does not support HTML5 video.
No comments:
Post a Comment