What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

How to add video on HTMP page?

BlueWhale

New member
Hello. Can someone explain me how to add videos on HTML page?

I will use this code to add images:

</div>
<div class="Gallery-Content--mediaContainer"><a name="NAME_OF_IMAGE.JPG"></a>
<div class="Gallery-Content--media">
<div class="imageContainer">
<img class="image-thumb" src="./NAME_OF_FOLDER_THAT_CONTAINS_IMAGE/NAME_OF_IMAGE.JPG"/>Full-size image is <a href="./NAME_OF_FOLDER_THAT_CONTAINS_IMAGE/NAME_OF_PHOTO,JPG">here.</a>
</div>

but when i replace the name of the photo with the name of the video, it doesn't work.
 
I tried to use this code. It displays only a picture of part of the video, but there is no play button.

<video width="320" height="240" autoplay>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
 
I tried to use this code. It displays only a picture of part of the video, but there is no play button.

<video width="320" height="240" autoplay>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Add "controls" attribute to this. like
<video controls width="320" height="240" autoplay>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
 
Back
Top