Error in the compiler

I’m doing the freecodecamp.com certification and I found what I think may be an error on their side. This part of the HTML module teaches about radio buttons and asks you to add some to the app you code throughout the course. The problem happens when I compile it and the built-in compiler shows the following error:

// running tests
Each of your radio button elements should be added within the form tag.
// tests completed

And this is my code:

<form action="https://www.freecatphotoapp.com/submit-cat-photo">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit<button>
  <label for="indoor"> 
      <input id="indoor" type="radio" name="indoor-outdoor">Indoor 
  </label>
  <label for="outdoor"> 
    <input id="outdoor" type="radio"  name="indoor-outdoor">Outdoor 
  </label>
</form>

As far as I’m concerned, the code for the buttons is within the <form> tags. I tried adding extra <form> tags wrapping the whole piece of code and also putting it on another separated <form> tag but the error remains unchanged.

Please provide your full code and a link to the challenge.

Sure. The code is the following:

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>

<form action="https://www.freecatphotoapp.com/submit-cat-photo">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit<button>
  <label for="indoor">
    <input id="indoor" type="radio" name="indoor-outdoor">Indoor
  </label>
  <label for="outdoor">
    <input id="indoor" type="radio" name="indoor-outdoor">Outdoor
  </label>
</form>
</main>

And I’m doing the Responsive Web Development Certification, and this is the radio buttons lesson, I think is number 21 in the HTML module of the course.

Ah. Now I see it. You changed your button element.

Your problem is you removed the / from the closing tag of your button element.

<button type="submit">Submit<button>

For what its worth, HTML is not compiled. You won’t find a ‘compiler’ error with HTML, CSS, or JavaScript. That’s more of a C, Rust, ect sort of thing.

1 Like

That was the problem. Thanks a lot.

Thank you as well, that solved the problem.

@JeremyLT True. I didn’t know what other way to call it. Can it be considered a console?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.