Cat Photos app step 22

After the unordered list, add a new image with an src attribute value set to:

And its alt attribute value to:

A slice of lasagna on a plate.

          <li>cat nip</li>
          <li>laser pointers</li>
        </ul><img  src=""><alt>A slice of lasagna on a plate.</alt></img>```
 What am I doing wrong here?

“alt attribute” not “alt element”.

All attributes are created in the opening tag of the respective element.

What is an attribute?

you’ve been shown attributes before for src is an attribute used to specify the image location inside the img opening tag.
href is also an attribute that is used to specify the location of the link inside the opening tag of an anchor element.

alt is yet another attribute so just add it to the opening tag of the anchor element (just like you would treat the href attribute)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.