HTML Introduction to HTML and CSS HTML: The Structural Foundation of Web Pages and Applications Test: Creating an HTML Element

pratyush raj
pratyush raj
7,048 Points

Give the image tag a src attribute with a file path of "images/spain.jpg"

index.html
<!doctype>
<html>
  <head>
    <title>My trip to Spain</title>
  </head>
  <body>

    <img src- "images/spain.jpg" alt="A picture of me in Spain">
    Here is a picture of me in Spain last summer!
    <a>Go back to the top of the page.</a>

  </body>
</html>

1 Answer

Rick Rana
Rick Rana
10,285 Points

Hey Pratyush,

It looks like you added a hyphen (-) after your src attribute instead of an equal sign (=). Make this simple adjustment and you should be good.

Your code:

<img src- "images/spain.jpg" alt="A picture of me in Spain">

Corrected code:

<img src="images/spain.jpg" alt="A picture of me in Spain">

:)