6

I didn’t know about the <button> tag until today.

1
  • Most importantly, does it work in all browsers? Commented Jun 9, 2010 at 6:23

4 Answers 4

8

Check this article

Inputs vs Buttons

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.

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

Comments

7

Basically, <button> is more flexible as it can contain other tags inside it. Like,

<button type="submit"><strong>Click</strong> me, <em>user!</em></button> 

You won't be able to do this with regular <input>.

Comments

0

You can include images in a <button> tag, but not in an <input> tag, amoung other differences

2 Comments

Not true. <input type="image" />
You can include more than one image in a <button>
0

See: W3C site.

They are very similar but the <button> tag has a few extras that can be useful on the odd occasion.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.