The <video> tag specifies video, such as a movie scrape or new video
streams in an HTML page.Currently supported video formats for the
<video> tag:MP4|WebM|Ogg.
<video> tag is new in HTML5 tags.
You can understand use of <video> tag by a simple example:-
The following attributes can be set for the <video> tag:-
Conclusion:--
<video> tag is new in HTML5 tags.
You can understand use of <video> tag by a simple example:-
Adding video using video tag:-
e.g.
<!DOCTYPE html>
<html>
<body>
<video width="320" height="180" controls>
<source src="http://....movie.mp4" type="video/mp4" >
<source src="http://....movie.ogg" type="video/ogg" >
Your browser does not support the video tag. </videogt;
</body>
</html>
Result:-
Any text between the <video> and </video> tags will be displayed in browsers that do not support the <video> element.
e.g.
<!DOCTYPE html>
<html>
<body>
<video width="320" height="180" controls>
<source src="http://....movie.mp4" type="video/mp4" >
<source src="http://....movie.ogg" type="video/ogg" >
Your browser does not support the video tag. </videogt;
</body>
</html>
Result:-
Any text between the <video> and </video> tags will be displayed in browsers that do not support the <video> element.
Adding video using iframe tag:-
e.g.
<!DOCTYPE html>
<html>
<body>
<iframe width="320" height="180" src="https://www.youtube- nocookie.com/embed/KtPv7IEhWRA?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen ></iframe>
</body>
</html>
Result:-
e.g.
<!DOCTYPE html>
<html>
<body>
<iframe width="320" height="180" src="https://www.youtube- nocookie.com/embed/KtPv7IEhWRA?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen ></iframe>
</body>
</html>
Result:-
The following attributes can be set for the <video> tag:-
<video> Tag Attributes
Attribute | Value | Description |
---|---|---|
autoplay | autoplay | video will start playing as soon as webpage load |
controls | controls | Specifies that video controls(play/pause button etc.) |
height | pixels | height of the video player |
width | pixels | width of the video player |
loop | loop | video will start over again, every time it is finished |
muted | muted | video will be muted |
src | URL | Specifies the URL of the video |
Conclusion:--
So the <video> tag use to insert a video in a webpage.It is inserted in
webpage by video src.
<video> tag का उपयोग webpage में video को Add करने के लिए किया जाता है जिस video को वेबपेज में add करना होता है उसे src attribute में define किया जाता है
<video> tag का उपयोग webpage में video को Add करने के लिए किया जाता है जिस video को वेबपेज में add करना होता है उसे src attribute में define किया जाता है
0 comments:
Post a Comment