Another Beginner's Question

Another Beginner's Question
0

#1

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>

#2

Can you please use the Ask a Question button when asking for help on a challenge? If not, then please always post the url to the challenge in your post.

Thank you.

P.S. You can edit your existing post and add the url now.


#3

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


#4

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


#5

You are correct. It was blending in with the code posted.


#6

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


#7

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>

#8


#9

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!


#10

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.


#11

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


#12

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.