using object fit in html and css code example
Example: onbject-fit css
The object-fit CSS property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container.
The object-fit CSS property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container.