Broken:Basic HTML and HTML5: Define the Head and Body of an HTML Document

Tell us what’s happening:
Your challenge is broken.

No matter what I change or what forum I look at for an answer it keeps popping and saying I have it wrong:
“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.”

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; rv:68.0) Gecko/20100101 Firefox/68.0.

Challenge: Define the Head and Body of an HTML Document

Link to the challenge:

Do you have any browser extensions, such as an adblocker or a darkmode extension?

No, this is my work computer so I haven’t added anything like that.

Your solution passes all tests when I run it. Is your browser up to date? If so, you can try clearing the freeCodeCamp storage in your browser and refreshing the page (you may need to log in again).

Finally got it to work after trying on both Chrome and Firefox. It passed, though I have no idea what stopped it from passing before.

I am facing the same issue in Firefox developer Edition, even after disabling all the extension, cleared browser storage and logged in again.

  • We will need to see your code in order to help.
  • Using the Developer Edition may mean bugs. We support the most recent public release versions of Safari, Firefox, Chrome, and Edge.
<!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 code passes in the most recent versions of Firefox and Chrome.

This is happening to me right now. I’m using Firefox on mobile, so obviously there are no browser extensions meddling.

Having the same problem here :confused:

If you share your code, we can check that it’s valid.
Check that you are using an up-to-date version of Firefox, Chrome, Safari, or Edge.
Disable any browser extensions that you may have installed.

I know the code is valid. It is the same as everyone else who has posted here. :woman_shrugging: My browser is updated and no extensions are running. I redid the lesson on a different computer running Edge and it worked fine. It was malfunctioning on a virtual Linux machine running Firefox. The CSS lessons are running fine on the Linux machine so far. Something is obviously wrong with that one module.

I am also facing same problem, i am install firefox latest version without extensions and my code like below :

<!DOCTYPE html>
<html>
  <head>
    <title>The best page ever</title>
  </head>
  <body>
    <h1>The best page ever</h1>
    <p>The best</p>
  </body>
</html>
1 Like

Hi @kalasagar. Looks like this is a problem with your code. You edited the h1 and p tag’s text which is not supposed to do in this challenge.

1 Like

Yep. For the purpose of these challenges you shouldn’t try to do other than exactly what they ask of you. Otherwise your modifications will mess with the test. I learned that lesson a while ago from this guy.
By the way, if you want to see what I mean, look here:
https://forum.freecodecamp.org/t/about-the-set-the-font-size-for-multiple-heading-elements-challenge/426198

1 Like

I have learned to keep your browser up to date here though, even though I passed this challenge without a problem. This will be helpful.

1 Like

This does not work for me
The three conditions: the body element should be a child of the html element; The head element shuold be a child of the html element; and the body elemen should wrap around both the h1 and p element did NOT work
This did not work even after i tried to copy and paste this solution

try updating your browser or deactivating browser extensions

1 Like

Be blessed, I updated the browser and it worked successifully