How i create form action

Tell us what’s happening:
am having issue with nesting input in form action

Your code so far

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

<a href="#"><img src="" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<form action=" cat photo">
<input type="text" placeholder="cat photo URL">

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36.

Challenge: Create a Form Element

Link to the challenge:

Hi Kizito, it’s not the nesting that is the issue. Check the URL that you have in the action attribute. Just copy paste the one they give you if it helps.

That said, when nesting you should indent the elements that are nested to make it easier to read. E.g.


That’s not the reason the test is failing, it’s just best practice.

1 Like

Please can you help put down the correct code for me because am still confused

Sure, you should do it like this:

<form action="">
  <input type="text" placeholder="cat photo URL">

The problem was you missed out the dashes in the url. It should be submit-cat-photo

Thank you so Much, I wish I have your contact so that you can assist me further cause am still novice.

you can always post on the forum with your questions and help requests, isn’t it better to have multiple people for help!

I understand now, thank you

You have to learn backend PHP or python to know more about form action.

the freecodecamp curriculum teaches NodeJS for backend

Its gradual cause I started new, I hope to be better

I will later when I reach the stage to avoid confusion

The back end is still further as in I will meet it in later stage

Check your URL address. -there -should -be -no-spaces-between-words.
(“”) Keep coding friends!