width |
Specifies the width of the targeted display area. "min-" and "max-" prefixes can be used. Example: media="screen and (min-width:500px)" |
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>The source media attribute</h1>
<picture> <source media="screen not (min-width:500px)" srcset="https://horje.com/avatar.png"> <source media="screen and (min-width:500px)" srcset="https://horje.com/avatar.png"> <img src="https://horje.com/avatar.png" alt="Horje Icon" style="width:auto;">
</picture>
</body>
</html>
Type
: |
html |
Category
: |
Web Tutorial |
Sub Category
: |
HTML Tag |
Uploaded by
: |
Admin |