Your submit button should have the attribute type set to submit.
What is this question related to? If you are working on a challenge, we need the challenge url and we need to see all of the code for this challenge.
To enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (
</>) will also add backticks around text.