@johnnygerard
Posted
Hello Christina,
To improve the picture element, use this code:
<picture>
<!-- Desktop hero image -->
<source
media="(min-width:768px)"
srcset="assets/images/illustration-sign-up-desktop.svg"
/>
<!-- Mobile hero image -->
<img
src="assets/images/illustration-sign-up-mobile.svg"
class="hero-img"
id="hero-img"
alt="Orange/red color hero image with tech images"
/>
</picture>
The fallback is already ensured by the nested img
tag and does not need any extra steps.
Marked as helpful