Is there a tag in the HTML video to make minimum height and width? I was wondering if it was possible. Thanks in advance.
Asked
Active
Viewed 315 times
-1
-
Potential duplicate https://stackoverflow.com/questions/20127763/video-100-width-and-height – tbone849 Jul 07 '19 at 01:59
-
Can you clarify what you mean by minimum? A video tag by default conforms to the dimensions of the video file. If your MP4 dimensions are 480x360 so too will your video tag so long as there's no styles assigning width or height. – zer00ne Jul 07 '19 at 02:18
-
minimum as in If a user makes their window smaller, the video will get smaller to a limit. – Pius Lee Jul 07 '19 at 12:32
2 Answers
0
You can set width and height on your video tag like so:
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

AllJs
- 1,760
- 4
- 27
- 48
0
You can use percentages within your dimensions. For example:
<video width=10% height=10% autoplay controls loop>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

Charlie Brown
- 16
- 2