Horje
HTML poster Attribute

Definition and Usage

The poster attribute specifies an image to be shown while the video is downloading, or until the user hits the play button. If this is not included, the first frame of the video will be used instead.


Applies to

The poster attribute can be used on the following element:

Elements Attribute
<video> poster

Browser Support

The poster attribute has the following browser support.


How to add A video player with a poster image - HTML poster Attribute

See the Example.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The video poster attribute</h1>

<video width="320" height="240" poster="https://horje.com/avatar.png" controls>
   <source src="https://www.sample-videos.com/video321/mp4/240/big_buck_bunny_240p_30mb.mp4" type="video/mp4">
   <source src="https://www.sample-videos.com/video321/mp4/240/big_buck_bunny_240p_30mb.mp4" type="video/ogg">
   Your browser does not support the video tag.
</video>

</body>
</html>

Output should be:

How to add A video player with a poster image - HTML poster Attribute




html poster attribute

Type:
Develop
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference