Add a Submit Button to a Form101

Add a Submit Button to a Form101
0.0 0

#1

Tell us what’s happening:
I need help.

Your code so far

<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>
<form action="/submit-cat-photo">
  <input type="text" placeholder="cat photo URL">
</form>
<button type="submit">submit</button>```
**Your browser information:**

Your Browser User Agent is: ```Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299```.

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

#2

Hello, send me a massage in private to talk more about your problem.


#3

No need for private messages. Just tell us what you are not understanding. What specifically do you need help with?


#4

the first one I cant get it to work but the other 3 I got it to work.

1 Your form should have a button inside it.

2 Your submit button should have the attribute type set to submit.

3 Your submit button should only have the text “Submit”.

4 Make sure your button element has a closing tag.


#5

Look at where your button element is located in relation to the form element. Is the button nested inside the form element or is it on the outside of it? Remember, when one element is inside (nested) in another element, then it will have the following syntax:

<mainElement>
  <nestedElement>This is the nested element's content</nestedElement>
</mainElement>