Is freeCodeCamp Wrong?!

I’m on the Challenge Create a Form Element and it claims that the code below is wrong. I get this message " The existing input element should be nested within a form element." I do belive that the input elemt is nested but if it is not please let me know because I can to not move on to future challenges. Thank you for reading :slight_smile:

<form action="https://freecatphotoapp.com/submit-cat-photo">
  <input type="text">
</form>



</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.197 Safari/537.36.

Challenge: Create a Form Element

Link to the challenge:

Please provide your full code.


I suspect the issue is that you have modified the input element instead of leaving the existing input element as it is.


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

but this is not the existing input element

1 Like

ok here is my full code

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

  <a href="#"><img src="https://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://freecatphotoapp.com/submit-cat-photo">
    <input type="text">
  </form>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Yep. You changed the input element rather than using the existing input element. That’s why your tests are failing.

so what do I do now? Thank you so much for replying btw :slight_smile:

You should use the original input element:

  <input type="text" placeholder="cat photo URL">
1 Like

<input> ? would this be right

I’m posting this for you to be able to format your posts correctly.


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

please use backticks when you write code

that is still not the existing input element
reset your code and you will see it, it has various attributes

ok ill try that! (nd im adding these letters because it has to be 20 characters long)

Click the “Reset All Code” button to start over fresh. DO NOT change any of the existing HTML. Only add the additional <form> tags that the instructions ask.

1 Like
<form action="https://freecatphotoapp.com/submit-cat-photo"
    <input type="text" placeholder="cat photo URL">
  </form>  
</main>

I still messed it up sorry guys

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Please provide your full updated code.

It looks like you didn’t close your opening form tag.

Looking at what you pasted here, you are missing something at the end of the opening <form> tag. Remember, every < needs to have a closing >.

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

  <a href="#"><img src="https://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://freecatphotoapp.com/submit-cat-photo"
    <input type="text" placeholder="cat photo URL">
  </form>  
</main>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).