3

The reason for my question is I'd like to use a search icon from an icon font, which I can't think of a good way to do with an input. I know IE6 and maybe 7 had some quirks with buttons, but if I'm not supporting those, are there any drawbacks to just using a <button> tag?

With a <button> tag I can just use the required html inside the tag.

GusRuss89
  • 1,314
  • 2
  • 13
  • 20

1 Answers1

2

The button element represents a button labeled by its contents.

A <button> can contain phrasing content (except for other interactive content such as <input>).

In my experience there's no problem using a <button> instead of an <input type=button>. IE7- will submit the <button>'s contents, which is odd. That's pretty much all you have to worry about, though.

Explosion Pills
  • 188,624
  • 52
  • 326
  • 405
  • Ah thanks for that. That's a pretty serious problem and maybe big enough for me to not use ` – GusRuss89 Jun 12 '13 at 03:39