How to create a form

Tell us what’s happening:
Describe your issue in detail here.

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

I’m struggling down the input type…Help me

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 Edg/92.0.902.73

Challenge: Create a Form Element

Link to the challenge:

Hi @arsxd81 !

Before I explain the instructions, you need to delete these *'s here

Now we are left with the original code which is this.

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

Here are the first part of the instructions.
Nest the existing input element inside a form element

This is the existing input.

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

Wrap your form tags around that.
If you need help on how to do that look at the example again.
This is the basic structure.

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

Here are the last part of the instructions.
assign "https://www.freecatphotoapp.com/submit-cat-photo" to the action attribute of the form element.

Place that URL from the instructions in the action attribute.

<form action="URL GOES HERE">
EXISTING INPUT GOES HERE
</form>

Hope that helps!

I Solved it easily with your help and I understood it … Thank you so much, Jessica! :smiling_face_with_three_hearts:

1 Like

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