Open In App

HTML | poster Attribute

Improve
Improve
Like Article
Like
Save
Share
Report

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: 
 

  • Absolute URL: It points to another webpage.
  • Relative URL: It points to other files of the same web page.

Example: 
 

html




<!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: 
 

  • Google Chrome 4.0
  • Internet Explorer 9.0
  • Firefox 3.5
  • Apple Safari 4.0
  • Opera 10.5

 



Last Updated : 08 Dec, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads