In this article, we will learn how to set the image that displays when downloading a video in HTML format.
HTML
The following is the syntax of HTML
<video poster="URL">
Let's dive into the following example where you can learn more about HTML
In the following examples, we use the
<!DOCTYPE html> <html> <body> <center> <video width="340" height="220" controls poster="https://www.tutorialspoint.com/static/images/logo-color.png"> <source src="https://samplelib.com/lib/preview/mp4/sample-5s.mp4" type="video/mp4"> </video> </center> </body> </html>
When the above script is executed, it will generate an output containing the uploaded video and the image added to the video as a poster using the
Consider the following example where we use two videos, one with the
<!DOCTYPE html> <html> <body> <center> <video width="340" height="220" controls poster="https://www.tutorialspoint.com/images/logo.png"> <source src="https://samplelib.com/lib/preview/mp4/sample-5s.mp4"> </video> <video width="320" height="240" controls> <source src="https://samplelib.com/lib/preview/mp4/sample-30s.mp4"> </video> </center> </body> </html>
When the script executes, it generates an output consisting of two videos uploaded to the web page, one with the HTML
The above is the detailed content of In HTML, how can we set the image to be displayed while the video is downloading?. For more information, please follow other related articles on the PHP Chinese website!