HTML Introduction to HTML and CSS Adding a New Web Page Test: Write and Style an Element

Anthony Tiseo
Anthony Tiseo
Front End Web Development Techdegree Student 3,512 Points

The instructions state to add a <body> element after the <head> element. I did that already. Why doesn't it work?

The instructions state to add a <body> element after the <head> element. I did that already but it still comes back as incorrect. Why doesn't it work?

index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <body>

    </body>
  </head>
</html>

4 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 43,508 Points

Your body element is inside the head element

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 43,508 Points

After would look like this

<!DOCTYPE html>
<html lang="en">
  <head>
  </head>

  <body>
  </body>
</html>

Hi Anthony,

You'll want your <body> element outside of the <head> (but still inside <html>).

Here's an example of basic HTML structure: https://www.w3schools.com/html/html_basic.asp

Collin Smith
Collin Smith
9,658 Points

So close! You only have to move the closing head tag above the opening body tag! Everything else looks great.