In the last article we learned;
Now we have completed many things in HTML. We have also seen how to add images to HTML, but definitely there are more ways to enhance our web pages. Let's see how we can add media elements to our pages for more engagement of users and create more informative web pages...
Following attributes are used in <video> tag:
Inside <video> and </video> tags, we will add source text describing the source of video with following attributes:- <select> element
- <textarea> element
Now we have completed many things in HTML. We have also seen how to add images to HTML, but definitely there are more ways to enhance our web pages. Let's see how we can add media elements to our pages for more engagement of users and create more informative web pages...
HTML5 Video
HTML5 <video> element specifies a standard way to embed a video in a webpage. Although video could be embedded before HTML5, it was only using the plug-in like flash. Let's see how to use <video> element:Following attributes are used in <video> tag:
- width and height : To describe width and height of the video
- controls : This adds video controls like play, pause, and volume.
- autoplay : To start video automatically
- src : Video name with address
- type : video/mp4 or video/webm or video/ogg
<video width="320" height="240" autoplay controls>
<source src="sample.mp4" type="video/mp4">
Sorry! Video not playable for you.
</video>
We will see the more efficient way to add youtube videos later.
That's all for today. I am keeping this article short just because of Christmas so you can enjoy more. In the next article, we will see some other elements related to media in HTML. Till the #keepCoding and Merry Christmas
Comments
Post a Comment