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

Tristan Lucy
Tristan Lucy
215 Points

can't remember how to do src tag

Can't go back and look?

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

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

  </body>
</html>

1 Answer

Christopher Villarreal
Christopher Villarreal
2,477 Points

<src> is not valid HTML. In fact, src is an attribute. So src, should be located within the img tag. Your code should look like this:

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