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

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

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 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>

2 Answers

Zhaopeng Wang
PRO
Zhaopeng Wang
Full Stack JavaScript Techdegree Graduate 32,207 Points
<!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>

Your image needs to have a source of where it is located to be used on your website. We use 'src' and then point to where the file path is, which in this case you were given as "images/spain.jpg". so you start with the element which is an image and then html tag is <img> and an alternative 'alt' should the person viewing your webpage's browser not be able to view the image. So final answer below:

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