Horje

How to add device-width Value in HTML <source> media Attribute

device-width Specifies the width of the target display/paper.
"min-" and "max-" prefixes can be used.
Example: media="screen and (device-width:500px)"
index.html
Example: HTML
<source media="screen and (device-width:500px)" srcset="https://horje.com/avatar.png">

Output should be:

How to add device-width Value in HTML <source> media Attribute




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