XHTML » input » type="button"

The type="button" control creates a rectangular button that can be clicked when you wish a desired action to occur. For example, you could use buttons to navigate through a recordset data source being displayed on a web page. (See the RDS objects in the ADO Quick Reference.) If you want to reset or submit the form, you should use the type="reset" and type="submit" controls.

A value for the name attribute is required. You can use the value attribute to assign a text that will be displayed on the face of the button. The default color is gray, but that can be changed using style sheets (see example at bottom of page). The text displayed on the button will set the minimum size, but you can set a different size using style sheets or the size attribute.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>DevGuru XHTML input Tag Example</title>
<input type="button" name="btn1" value="click me" />
Language(s): HTML