![]() |
Definition and UsageThe This attribute is required when Browser SupportThe numbers in the table specify the first browser version that fully supports the attribute. Syntax
Attribute Values
|
Example:
HTML
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>The picture element</h1>
<p>Resize the browser window to load different images.</p>
<picture>
<source media="(min-width:650px)" srcset="https://horje.com/avatar.png">
<source media="(min-width:465px)" srcset="https://horje.com/avatar.png">
<img src="https://horje.com/avatar.png" alt="Flowers" style="width:auto;">
</picture>
</body>
</html>
html <source> srcset attribute |
How to add HTML <source> srcset Attribute | HTML Attribute |
Read Full: | HTML Attribute |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |
Views: | 47 |
Reffered: https://www.w3schools.com/tags/att_source_srcset.asp