1. Computing & Technology

Button Tag Examples

Examples of How the <button> Tag Works

The BUTTON tag is a really useful form tag that you can use to make almost any type of HTML into a submit button for your forms.

Return to the <button> Tag Information Page

Basic Button with an Image

This form has only the submit button, but it's just a standard HTML image. When clicked it would submit the form.

Image as an image: submit

Image as a button:

<form action="#">
<button type="submit" name="button1" value="clicked">
<img src="cecb2.gif" width="32" height="32" alt="submit" border="0" />
</button>

</form>

Return to the <button> Tag information page.


Basic Button with Text

<form action="#">
<button type="submit" name="button1" value="clicked">
Submit
</button>

</form>

Return to the <button> Tag information page.


Button with Both Text and an Image

<form action="#">
<button type="submit" name="button1" value="clicked">
<p>
Submit Now<br/>
<img src="http://webdesign.about.com/library/graphics/cecb2.gif" width="32" height="32" alt="submit" border="0" />
</p>
</button>

</form>

Return to the <button> Tag information page.

Discuss in my forum

©2012 About.com. All rights reserved.

A part of The New York Times Company.