Welcome to the Treehouse Community
Looking to learn something new?
Input type submit or Button type submit
I just saw on MDN that the input tag can have the attribute type set to "submit".
Is there a difference between using the input tag with the attribute type and its value set to submit:
<input type="submit" value="Sign Up">
and the button tag with the attribute type and its value set to submit ?
<button type='submit'>Sign Up</button>
And for the record Liam Maclachlan, you can definitely style the button element with CSS! It can also contain other content/child elements, such as images, which can also be styled.
Dani Ivanov10,732 Points
I think the input type submit has wider support across browsers as it is an older tag than button.
Have a look at the browser compatibility table over here (near the end of the page)
Liam Maclachlan22,805 Points
Personally I prefer using the input type. Not only for what Daniel mentions but you can format it to look how you want it to using CSS.
I don't believe that button can be formatted using css :)