How to add submit button to a form

How to add submit button to a form
0.0 0

#1

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:


#2

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.


#3

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


#4

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


#5

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”.


#6

but i have to keep it form element
still not running


#7

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


#8

Post your updated code.


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

#10

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.


#11
<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".

#12

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>

#13

Thanks Sir . Now problem is solved.
Thanks a lot