Horje

How to add and Value in HTML <source> media Attribute

and Specifies an AND operator
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The source media attribute</h1>

<picture>
  <source media="screen and (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>

Output should be:

How to add and Value in HTML <source> media Attribute




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