Create an Form Element

Tell us what’s happening:
The existing input element should be nested within a form element.
i don’t know how to do it. I tried many ways but none of them are correct, if anyone knows how to do it can you help me? Thank you

  **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://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 input action="https://freecatphotoapp.com/submit-cat-photo">  
</form>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0.

Challenge: Create a Form Element

Link to the challenge:

You forgot to fill in the Tell us what’s happening section!

It looks like you did not

Nest the existing input element inside a form element

And how do i nest the existing input inside a from?

You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action attribute on your form element.

For example:

<form action="/url-where-you-want-to-submit-form-data">
  <input> # This is nested
</form>

I did exactly the same and it’s not working i don’t know what i’m doing wrong…

Nest the existing input element inside a form element and assign "https://freecatphotoapp.com/submit-cat-photo" to the action attribute of the form element.

Example:

<form action="/url-where-you-want-to-submit-form-data">
  <input> # This is nested
</form>

Yours:

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

These two are not exactly the same. You have not nested the existing input inside of the new form opening and closing tags. You cut the word input out of the input tag and put it inside of the form tag.


This is the original input element:

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

It worked now. Thank you so much for your help

1 Like

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats

here’s an answer for you question I’ve stuck on this question for 2 day now I solved it

@komashrpv, read the post and you will see that it’s been resolved.

Further, we don’t post solutions. Since you didn’t format your post correctly the answer doesn’t actually show and I’m going to leave it that way. The text below is for future reference.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
If you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.