Category Archives: HTML

What Is the Difference Between <button> and <input type="button">?

Question

What is the difference between <button> and <input type="button">?

Answer

From “17.5 The BUTTON element” in the HTML 4.01 Specification:

Buttons created with the button element function just like buttons created with the input element, but they offer richer rendering possibilities: the button element may have content. For example, a button element that contains an image functions like and may resemble an input element whose type is set to “image”, but the button element type allows content.

References

Raggett, Dave, ed. “HTML 4.01 Specification”. W3C Recommendation. World Wide Web Consortium (W3C). December 24, 1999.