7. Embedding Video in Web Pages
Image:
HTML video tag with controls
Example:
HTML
<!DOCTYPE
html>
<html>
<head>
<title>Video Example</title>
</head>
<body>
<h1>Video Player</h1>
<video width="320" height="240"
controls>
<source
src="path/to/your/video.mp4" type="video/mp4">
Your browser does not support the video
tag.
</video>
</body>
</html>
Explanation:
- The <video> tag is used to embed video content in HTML5.
- The width and height attributes specify the dimensions of the video player.
- The controls attribute adds play, pause, volume, and full-screen
controls to the player.
- The <source> tag specifies the path to the video file and its type.
- The text between the closing <source> tag and the closing <video>
tag is displayed if the browser doesn't support the video element.
No comments:
Post a Comment