HTML5 video poster image.


 

HTML5 video poster image.

In this tutorial, you will see the use of poster attribute of video tag in HTML5.

In this tutorial, you will see the use of poster attribute of video tag in HTML5.

HTML5 video poster image.

Introduction:

The <video> tag supports many attributes. Each attribute gives additional information for browser about the video tag. If you add image instead of video, then you use poster attribute for address of image. The poster attribute holds address of image.

Attribute of video tag:

Attributes Value Description
poster URL of a image Address of image.

Declaration Syntax :

Declaration syntax of poster attribute of video  tag in HTML5.

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

Example of poster attribute in HTML5:

Code:
VPosterAttribute_Tag.html
<!doctype html >
<html >
<head>
<title>Video Tag attributes.</title>
</head>
<body>
<p><b>Example of poster attribute of video tag in HTML5.</b></p>
<video poster="4.jpg" controls >
Browser does not support video tag.
</video >
</body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

The video tag  is only available in HTML5. It is not available in HTML4.01.

Ads