Create a Form Element-Please help

Create a Form Element-Please help
0.0 0

#1

Tell us what’s happening:

I don’tt understand how to do this.

These are the objectives: Nest your text input element within a form element.
Make sure your form has an action attribute which is set to /submit-cat-photo
Make sure your form element has 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>

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-form-element


#2

The first instruction says:
“Nest your text input element within a form element”

Ok, so where is the form element? It is the one that starts with <form and ends with </form>
So how do we “…nest…within…” . That part means you have to add something between the starting <form tag and the ending </form> tag. What do they want to add?
They want to add a “text input element”. Ok, so what is that?
If you refer to the older exercises you will see this topic https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-text-field which talks about how to add a input field of type text.
So just use the same thing inside the form element here.

Finally, the instruction wants you to add an action. This same exercise describes how to do that (just look a the sample code and do the same).

Hopefully this helps.