HTML - attributes - poster

revision:


Content

"poster" attribute: image to be shown while video is downloading syntax some examples


"poster" attribute: image to be shown while video is downloading

top

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.

The poster attribute can be used on the following element: <video>


syntax

top

<video poster="URL"></video >

URL: it contains a single value URL which specifies the link of source image. There are two types of URL links: absolute URL, which points to another webpage, and relative URL, which points to other files of the same web page.


some examples

top
codes:
                    <video style="margin-left:5vw;" width="320" height="240" 
                    poster="../pics/cartoon.jpg" controls>           
                        <source src="../../pics/Wuzhen-20-10_02.mp4" type="video/mp4">
                        Your browser does not support the video tag.
                    </video>
                
codes:
                    <video style="margin-left:3vw;" width="320" height="240" 
                    poster=" " controls>                         
                        <source src="../../pics/Wuzhen-20-10_02.mp4" type="video/mp4">
                        Your browser does not support the video tag.
                    </video>