8

I'm just wondering if input is part of the HTML5 spec or is button the better way or is there something else even better to use.

<input type="submit" value="submit"/>

<button type="submit">submit</button>
3
  • 1
    possible duplicate of <button> vs. <input type="button" />. Which to use? Commented Jun 6, 2013 at 13:30
  • 1
    Take a look at this question. Commented Jun 6, 2013 at 13:30
  • Good link. It's type=submit here, though, so not an exact duplicate. Commented Jun 6, 2013 at 13:32

2 Answers 2

3

From the MDC docs:

"<button> elements are much easier to style than <input> elements. You can add inner HTML content (think <em>, <strong> or even <img>), and make use of :after and :before pseudo-element to achieve complex rendering while <input> only accepts a text value attribute."

Sign up to request clarification or add additional context in comments.

Comments

1

Their difference lies in how you use them. Whilst their basic function is the same the main difference is that you can put HTML in a <button> element.

<button> also is known to have issues in some versions of IE (IE6)

1 Comment

Everything is a problem in IE (IE6) :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.