Another Beginner's Question

Major Beginner here, understanding concepts but not syntax and placement. This is the lesson (20) I’m on:

https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/add-a-submit-button-to-a-form

This is the code I've got so far and I've accomplished all but the 3rd task: This is the error:  Your submit button should only have the text "Submit"

I've tried a variety of options on WHERE to put this element and nothing works. 
What/where? Do I change an existing element or add one?
Thank you in advance

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>
  
  <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>
  <form action="/submit-cat-photo">
    <button type="submit"></button> placeholder="cat photo URL">
  </form>
</main>

thanks for your help! I believe I did include the link if this is the correct one you’re to which you’re referring:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/add-a-submit-button-to-a-form

the Ask a Question button… the Ask for Help? button?

So you’re missing the third test. You need to have text in that button. How would you add text to that button?

Elements have attributes which we can assign values. The original code had an input element which looked like:

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

For some reason you deleted the first part <input type="text". You should add that back in.

Also, the button element should be the last element of the form element. This means the button code should be after/below the input element code.

Lastly, the instructions said your button element should have the text “Submit”. An element’s text is the part which goes in between the opening tag and the closing tag. For example, the following h1 element’s text is Hello World.

<h1>Hello World</h1>
1 Like

so, yeah the Ask for Help - I’ve used it, When I select it - it opens a window that says “create a help post on the forum” or “cancel.” I’m definitely confused now!

ok, if I refer to lesson 17 - Create Text Field. Input elements. would I use <button type=Submit> and ?

A big problem is that even though I accomplish some tasks, there are often still mistakes in the code of which I’m unaware.

Thanks for hanging in with me.

last one was supposed to include whether I should use button placeholder?

Third challenge is about adding text on button.
You can easily do that by writing you desired text between the opening and closing tags.
For example : If you want a button with text “Hello”, you can do it like this:

<button>Hello</button>

In your case you just have to write “Submit” and you will pass the test.
Hope this helps.

1 Like