Video and audio support in HTML5
HTML5 includes native support for video and audio playback, without the need for plugins like Flash. Here's an example of how to embed a video on a web page:
<!DOCTYPE html>
<html>
<head>
<title>My Video</title>
</head>
<body>
<video controls>
<source src="myvideo.mp4" type="video/mp4">
<source src="myvideo.webm" type="video/webm">
Your browser does not support the video tag.
</video>
</body>
</html>
In this example, we use the <video> tag to embed a video on the web page. The "controls" attribute adds playback controls to the video player. We also include two different video formats, MP4 and WebM, to ensure compatibility with different browsers.
No comments:
Post a Comment