The Wayback Machine - https://web.archive.org/web/20240715143647/https://www.geeksforgeeks.org/html-video-poster-attribute/
Open In App

HTML | <video> poster Attribute

Last Updated : 15 Jul, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The HTML <video> poster Attribute is used to display the image while video downloading or when user click the play button. If this image not set then it will take the first frame of video as a poster image. 

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

 

Note: Always specify the width and the height of the video else web page will be confused that how much space that video will be required due to that reason web page become slow down.

Supported Browsers: The browser supported by HTML <video> poster Attribute are listed below:

  • Google Chrome 3.0 and above
  • Edge 12.0 and above
  • Firefox 3.6 and above
  • Internet Explorer 9.0 and above
  • Opera 10.5 and above
  • Safari 3.1 and above

Previous Article
Next Article

Similar Reads

What is use of poster attribute in the HTML video Tag?
The "poster" attribute in &lt;video&gt; Tags are used to specify an image that represents the video content before the video is played or while the video is loading. This attribute allows developers to display a custom poster image, such as a thumbnail or a promotional image, to provide a visual preview or context for the video content. Syntax&lt;v
2 min read
How to make HTML5 Video Poster be same Size as Video Itself ?
To make an HTML5 video poster the same size as the video itself to achieve this you can use the HTML5 &lt;video&gt; elements, you can specify a poster frame that will be displayed before the video starts playing. To ensure that the poster image is the same size as the video itself, you should use an image with the same dimensions as the video. Belo
3 min read
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. Syntax: Return the po
2 min read
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 &lt;video&gt; element. Syntax: &lt;video poster="URL"&gt; Attribute Values: It contains a single value URL which s
1 min read
HTML &lt;video&gt; crossorigin Attribute
The HTML crossorigin attribute is used in the &lt;video&gt; element that supports a CORS request when we tried to fetch out the video files from the third-party servers or from another domain. Syntax: &lt;video crossorigin="anonymous | use-credentials"&gt; Attribute Values: anonymous: It has a default value. It defines a CORS request that will be s
1 min read
HTML | &lt;video&gt; height Attribute
The HTML &lt;video&gt; height attribute is used to specify the height of the video player in terms of pixels. Syntax: &lt;video height="pixels"&gt; Attribute Values: It contains single value pixels which specifies the height of the video player in terms of pixels. Below example illustrates the use of height attribute in &lt;video&gt; element: Examp
1 min read
HTML | &lt;video&gt; controls Attribute
The HTML &lt;video&gt; controls Attribute is used to specify the control to play video. It is the Boolean value. This attribute is new in HTML5. The video control should include: PlayPauseVolumeFull-screen ModeSeekingCaptions/Subtitles(if available)Track(if available) Syntax: &lt;video controls&gt; Example: C/C++ Code &amp;lt;!DOCTYPE html&amp;gt;
1 min read
HTML | &lt;video&gt; loop Attribute
The HTML &lt;video&gt; loop Attribute is used to restart the video again and again after finishing it. It contains the Boolean value. This tag is new in HTML5. Syntax: &lt;video loop&gt; Example: C/C++ Code &amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html&amp;gt; &amp;lt;head&amp;gt; &amp;lt;title&amp;gt;HTML video loop Attribute&amp;lt;/title&amp;gt;
1 min read
HTML | &lt;video&gt; src Attribute
The HTML &lt;video&gt; src Attribute is used to specify the URL of the video file. This attribute uses Ogg file on Firefox, Opera and Chrome browsers and MPEG4 file on Internet Explorer and Safari browsers. This attribute is new in HTML5. Syntax: &lt;video src="URL"&gt; Attribute Values: It contains a single value URL which specifies the link of so
1 min read
HTML | &lt;video&gt; muted Attribute
The HTML &lt;video&gt; muted Attribute is used to specify the audio output of the video is muted, it is a Boolean attribute. Syntax: &lt;video muted&gt; Example: C/C++ Code &amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html&amp;gt; &amp;lt;head&amp;gt; &amp;lt;title&amp;gt; HTML Video muted Attribute &amp;lt;/title&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;bod
1 min read
three90RightbarBannerImg