HTML Video Tag - Brown Surfing

HTML Video Tag

Posted on: July 11th, 2022
By: Efrain Lemus

<video controls playsinline autoplay muted class="w-100 h-auto" poster="/wp-content/uploads/2020/03/image-name.jpg" src="
/wp-content/themes/theme-name/assets/video-name.mp4#t=0.5
"></video>

The #t=0.5 makes it start at a certain time, which also gives it a poster image, so adding the poster image won’t be necessary. Unless you want a specific one.

Here’s how to make the video play and pause with JavaScript.

videoHTML.play();

videoHTML.pause();

Have any questions or comments? Write them below!


Leave a Reply

Your email address will not be published.