I would like to have a submit button which contains text and an image. Is this possible?
I can get the exact look I want with code that looks like:
<img src="save.gif" alt="Save icon"/>
<input type="submit" ...>
input type="submit" is the best way to have a submit button in a form. The downside of this is that you cannot put anything other than text as its value. The button element can contain other HTML elements and content.
type="submit" instead of
type="button" in your
button element (source).
Pay particular attention however to the following from that page:
If you use the button element in an HTML form, different browsers will submit different values. Internet Explorer will submit the text between the
</button>tags, while other browsers will submit the content of the value attribute. Use the input element to create buttons in an HTML form.