Help: Creating a form element can't pass through

Hi

I am on one of the activities to create a form element and the task is:
Nest the existing input element inside a form element and assign "https://www.freecatphotoapp.com/submit-cat-photo" to the action attribute of the form element.

The existing input element should be nested within a form element.

Your form should have an action attribute which is set to https://www.freecatphotoapp.com/submit-cat-photo .

Your form element should have well-formed open and close tags.

  **Your code so far**

<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="/submit-cat-photo">**
**<input type="text" placeholder="cat photo url">**
**</form**
</main>

The code I have created in response to this to create a form element is above and down below:
“/submit-cat-photo”>

</form After putting this code through the system doesn't let me pass this assignment even though I have followed the instruction, please help, not sure what mistake I may have made but I have tried various versions and still won't let me pass through, any help would be greatly appreciated!

Thanks

There are a few issues with the code you provided

  1. The action attribute is not what you were tasked with using
  2. The input element has been changed
  3. The closing form tag is not correct (it’s missing the angle bracket)

Would probably be best to reset the code to start over. Read and follow the instructions carefully.

In the future,

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

1 Like

Thanks Roma, for your help. I am new to coding and have tried to input your suggestions, I have had a go at making some changes and have inputted the code below but this isn’t correct according to the system. Do I need to change the existing a href that has been linked to the image or create a new one?

Thanks

We need to see your new code.

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 (').

If this is the lesson I believe it is then you were only tasked with creating the form element. There is no need to alter any other code.

Thank you for explaining this that makes sense why I couldn’t show the code. Yes you are right I didn’t need to alter the other code :+1:

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