Horje

How to add aspect-ratio Value in HTML <source> media Attribute

aspect-ratio Specifies the width/height ratio of the targeted display area.
"min-" and "max-" prefixes can be used.
Example: media="screen and (aspect-ratio:16/9)"
index.html
Example: HTML
<source media="screen and (aspect-ratio:16/9)" srcset="https://horje.com/avatar.png">

Output should be:

How to add aspect-ratio Value in HTML <source> media Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin