How make head and body elements child of html

Tell us what’s happening:
Please can someone loog at this code and tell me what is wrong in it because I have tried to run it but I keep getting this error message:

" // running tests The

head

element should be a child of the

html

element. The

body

element should be a child of the

html

element. The

head

element should wrap around the

title

element. The

body

element should wrap around both the

h1

and

p

elements. // tests completed"

Your code so far


<!DOCTYPE html>
<html>
<head>
  <title>The best page ever</title>
</head>
<body>
  <h1>The best page ever</h1>
  <p>Cat ipsum dolor sit amet, jump launch to pounce upon little yarn mouse, bare fangs at toy run hide in litter box until treats are fed. Go into a room to decide you didn't want to be in there anyway. I like big cats and i can not lie kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Meow i could pee on this if i had the energy for slap owner's face at 5am until human fills food dish yet scamper. Knock dish off table head butt cant eat out of my own dish scratch the furniture. Make meme, make cute face. Sleep in the bathroom sink chase laser but pee in the shoe. Paw at your fat belly licks your face and eat grass, throw it back up kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
  </p>
</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 UBrowser/7.0.185.1002 Safari/537.36.

Challenge: Define the Head and Body of an HTML Document

Link to the challenge:

1 Like

Hey @tasiecc. Can you please remove the <!DOCTYPE html> and try again. It worked for me.
The challenge tells you to add an html, head, and body tags only.

I have tried it, yet I still get the same error message

1 Like

Please share your current code. When posting code, please do as follows: