asp.net.ph

Skip Navigation Links

BUTTON Element | BUTTON Object

Language References


Specifies a container for rich HTML that is rendered as a button.HTML 4, 4.01, 5

HTML Syntax

Remarks

The BUTTON element creates buttons which function like buttons created with the INPUT element, but offer richer rendering possibilities. The BUTTON element may have content.

The type attribute specifies the visual appearance and default behavior of the button.

Though BUTTON can contain images, it is not valid to associate an image map with an IMG that appears as the contents of a BUTTON element.

Conforming browsers typically render BUTTON with relief and an up/down motion when clicked.

When the BUTTON object is submitted in a form, Microsoft® Internet Explorer® 5 and later submits the value, if it exists. Otherwise, the innerText is submitted. In Microsoft Internet Explorer® 4, only the innerText value is submitted.

Members

BUTTON Members

Example

The following example shows submit and reset buttons done with BUTTON instead of INPUT.

First name:
Last name:
email:
Male Female
 

Below is the HTML fragment for the sample above.

<form>
<table>
...
<tr>
<td><button type="submit"
   style="background:#036;color:gold;font:bold">
   Send</button></td>
<td><button type="reset"
   style="background:#800;color:gold;font:bold">
   Reset</button></td></tr>
</table>
</form>
See Also

INPUT



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note