How to submit a mail

i am using a submit type in a input label in a form like this:

<form method="get" action=" https://www.freecodecamp.com/email-submit" id="form">
  <label for="fname">First name:</label>
  <br>
  <input type="text" id="fname" name="fname"><br>
  <label for="lname">Last name:</label>
  <br>
  <input type="text" id="lname" name="lname">
  <br>
  <label for="email">Email:</label>
  <br>
  <input type="email" id="email" placeholder="enter your mail">
  <p><input type="submit" value="Send and submit" id="submit"></p>
</form>

And when i make the test, it shows me a fail, what am i doing wrong?

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

@jjusturi, is this part of the survey form project? If so, 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.

If you have more questions would you please provide a link to your pen rather than a small code snippet?

On a side note, do not use the <br> element to force line breaks or spacing. That’s what CSS is for.

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