Using a Graphic Submit Button

If you'd like your submit button to look more integrated with your visual design, you can create an image and use it for the submit process instead. The caveat here is that this technique does not equally apply for the reset button unless you add JavaScript. But in terms of HTML itself, you can use a custom button for submit if you so desire.

For Example 5-12, I created a graphic submit button for my form and inserted it into the form using the input element with additional attributes for the image.

Example 5-12. Using a graphical submit button

<form method="get" action="http://www.myserver.com/cgi-bin/mailscript/"><input type="image" src="submit-button.gif" width="75" height="25" alt="submit!" value="submit" /> ...

Get Spring Into HTML and CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.