Resposibe web design project 3 "Product landing page"

Hi whats up! can somebody help me? I’m doing this thest
i’m struggles with:

11. Within the form, there is a submit with corresponding id=“submit”.

i’ve been trying to found which could be my error
i haven’t found it yet

<main>
  <h2>Handcrafted, home-made masterpices</h2>
  
  
    <form id="form" action="https://www.freecodecamp.com/email-submit" target= "_blank">      
      <input id="email" type="email" placeholder="Enter your email address">
      <button id="submit" type="submit">Submit</button>
    </form>
  

</main>

Maybe using an input instead of a button;

<input id="submit"  type="submit" name="submit" value="Submit">
1 Like

It is always best if you include a link to your project (on codepen or wherever) so we can test this for ourselves.

Ok thank you so much

This is the error message:

11. Within the form, there is a submit <input> with corresponding id="submit".

So yes, what @ischristian said, you need to use an <input> instead of a <button>.

yeah is true now has passed, but that is correct? it’s mean is a good practice use input instead a button?

They are basically interchangeable but yes, I usually use a <button> because it is more flexible since you can put HTML between the opening and closing tags.

Your code was fine, using a <button> here is perfectly fine, but the tests dictate an <input> and thus if you want to pass that particular test then an input it is.

1 Like

@david_5048, I realize you were given the answer and you marked this solved.

I just want to point out that when a test fails, click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The full error message was

Within the form, there is a submit <input> with corresponding id="submit".
#submit should be an <input> element : expected 'BUTTON' to equal 'INPUT'
AssertionError: #submit should be an <input> element : expected 'BUTTON' to equal 'INPUT'

which tells you what the test was looking for and why it was failing.
Hope that helps in the future.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.