HTML | DOM Video poster Property

The Video poster property is used for setting or returning the value of the poster attribute of a video. The poster attribute is specifically used to display an image while the video is being downloaded, or until the play button is hit by the user.
The first frame of the video is displayed if the poster option is not included.

Return the poster property:


Set the poster property:

videoObject.poster = URL

Property Values

  • URL : It is used to specify the URL of the image file.

Below program illustrates the Video Poster property :

Example: Changing the poster image of a video.





<!DOCTYPE html>
  <title>DOM Video poster Property</title>
<body style="text-align:center">
    <h1 style="color:green">
    <h2 style="font-family: Impact">
      Video Poster Property
    <video id="Test_Video" 
        <source src="samplevideo.mp4"
        <source src="movie.ogg" 
    <p>To change the poster image,
      double click the "Change Poster" button.</p>
    <button ondblclick="My_Video()"
            type="button">Change Poster</button>
        function My_Video() {
              "Test_Video").poster = "Unknown.png";


Before clicking the button::

After clicking the button:

Supported Browsers:

  • Apple Safari
  • Internet Explorer
  • Firefox
  • Google Chrome
  • Opera


My Personal Notes arrow_drop_up

I am a technology enthusiast who has a keen interest in programming I am pursuing Engineering in Computer Science from GEU, Dehradun I like to unwind by watching movies and English sitcomsI have a keen interest in music

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.