1. Computing

Discuss in my forum

<input type="button">

By

INPUT Button Description:

The button INPUT tag gives you a way to create simple input buttons with custom text. It is similar to the INPUT submit tag but is slightly more flexible.

DTD: HTML5: <!doctype html>
HTML4 Strict: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
HTML4 Transitional or Loose: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

INPUT Button Web Browser Support:

HTML Versions

INPUT Button Attributes:

INPUT Button Usage:

Standard input button

<form>
<input type="button" value="this is a text button">
</form>

Styled input button

<form>
<input type="button" value="this is a styled text button" style="background-color:#c00; color:#fff;">
</form>

See an example of a plain button input tag and a styled button input tag.

INPUT Button Special Notes:

The input button tag will not submit the HTML form without some JavaScript to make it work. If you don't have any JavaScript onclick you will frustrate your readers, as clicking the button won't do anything.

I recommend using the BUTTON tag rather than the INPUT type="button" tag. The BUTTON tag is more flexible. You can add images to it, and it can be defined as a submit or reset type of button without needing any extra JavaScript.

More INPUT Button Information:

  1. About.com
  2. Computing
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. The INPUT Button Tag - INPUT Button - HTML Tag for Text Buttons

©2014 About.com. All rights reserved.