Open In App

HTML | poster Attribute

The HTML poster Attribute is used to display the image while video downloading or when the user clicks the play button. If this image not set then it will take the first frame of video as a poster image.
Applicable: 
It is mainly used in <video> element. 
Syntax: 
 

<video poster="URL">

Attribute Values: It contains a single value URL which specifies the link of source image. There are two types of URL link which are listed below: 
 



Example: 
 




<!DOCTYPE html>
<html>
 
<head>
    <title>
    HTML video poster Attribute
</title>
</head>
 
<body>
    <center>
        <h1 style="color:green;">
        GeeksforGeeks
    </h1>
 
        <h3>HTML poster Attribute</h3>
 
        <video width="400"
            height="200"
            controls poster=
             
            <source src=
                    type="video/mp4">
            <source src=
                    type="video/ogg">
        </video>
    </center>
</body>
 
</html>

Output: 
 



Supported Browsers: The browsers supported by HTML poster Attribute are listed below: 
 

 


Article Tags :