How to add submit button to a form

I stucked on this step. I have to add submit button in form element but dont know where I am doing mistake. Please help

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back. " src="https://bit.ly/fcc-relaxing-cat"></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>
<button type="submit">
<form action="/submit-cat-photo">
  <input type="text" placeholder="cat photo URL">
</form>
  </button>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36.

Link to the challenge:
https://www.freecodecamp.org/challenges/add-a-submit-button-to-a-form

Check your errors in the bottom left side of the challenge page , the ones that have a cross mark (x) beside them. It says what you have to fix in order to pass.

Your form should have a button inside it.
Your submit button should only have the text “Submit”.
These 2 points I am not able to do.
Could you please let me know

You have done the opposite. You have put your form inside a button.

You’re placing the button outside the form element. It should be inside (nested inside the form).

This is how you add text to button: <button>Add text here</button. So this button will have the text “Add text here”.

but i have to keep it form element
still not running

I have to keep it in form element
not able to understand really

Post your updated code.

this is the updated code *Your submit button should only have the text "Submit". above mentioned point is remaining only

We need to see your actual code to help you at this point. Just copy and paste all of it into a reply, but make sure to following the instructions below so we see the code.

To enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

markdown_Forums

<form action="/submit-cat-photo">
  <button type="submit"></button>
  <input type="text" placeholder="cat photo URL">
  
</form>

Your submit button should only have the text "Submit".

Your submit button has no text at all. A very basic example of a button element with text can be seen below.

<button>Here is an example of a button with text</button>
1 Like

Thanks Sir . Now problem is solved.
Thanks a lot