Struggling with submit buttons on forms

Struggling with submit buttons on forms


During my learning of html I’ve noticed two different ways of putting buttons into forms.

On the product landing page, I tried this method that i basically copied from the example. Can you have a look at this pen and tell me why it’s not functioning as a button?

User Story #12: When I click the #submit element, the email is submitted to a static page (use this mock URL: that confirms the email address was entered and that it posted successfully.

                                    <input id="email" type="email" name="" placeholder="Enter Email Address" required/>
				<input id="submit" type="submit" value="Subscribe" class="btn">

Pen here:


If you read a little more information about the error, you will see the following message:

AssertionError: The #email element’s name attribute should have a value of “email” : expected ‘’ to equal ‘email’

Though it may not be explained in the curriculum (I would have to double check), when you submit information from a form to another page, the information is parsed on the other page using the name attributes of the input elements. So you should always fill in a value for the name attribute of a form element input. I would typically name them the same as the id, unless the user stories specify otherwise.


damn. I feel so stupid. how did i miss that! jeees. But why does the cursor not change when I hover over the button? and also how would I change the hover state of the button ?