Our image is missing a — let’s add one:
In this case, we’re missing the alt
attribute that describes the image for people using screenreaders, or people with slow or flaky internet connections that can’t download the image. Let’s add one:
Shorthand attributes
It’s not uncommon to have an attribute where the name and value are the same, like src={src}
. Svelte gives us a convenient shorthand for these cases: