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

img tag attributes

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>

Works!

4 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 40,436 Points

Are you receiving an error message? Your code works for me.

+1

yes, i was but not now.... thanks

Kishan P
Kishan P
8,189 Points

Rashi rana ,

Your code is perfect.

Liz Laffitte
Liz Laffitte
18,327 Points

I passed the challenge using your code!

Thank you!