HTML by Patrik

HTML 'video' Tag

The <video> tag creates a video player on a web page.

This player supports video playback directly inside the HTML page with media controls like start, stop, volume, and others.

Example

A <video> with media controls (start, stop, volume, etc).

<video controls="controls" width="400" poster="<your image poster if applicable>">
   <source src="/media/movie.mp4" type="video/mp4">
   <img src="<your No video support image>" title="Your browser does not support the <video> tag" />
</video>

Additional Resources:

...see more

In CSS there is an aspect-ratio property. Set the width (In any way: px/%/...) and then add aspect-ratio property with ... well... aspect ratio.

iframe { 
  width: 100%;
  aspect-ratio: 16 / 9;
}

Additional Resources

Comments