1. Home
  2. Computing & Technology
  3. Web Design / HTML

<button></button>

By , About.com Guide

< Previous | HTML 4.01 Tags / XHTML 1.0 Elements | Next >

Free XHTML 1.0 Class | HTML Validators | Free HTML 4.01 Class

<button> Description:

The <button> tag defines a versatile button element for XHTML forms.

<button> Web Browser Support:
<button> Attributes:

All attributes are optional unless indicated.

<button> End Tag:
</button> REQUIRED
<button> Contents:

CDATA. Encloses the HTML element that is the input button, usually an image. The following tags are valid within the <button> tag:
a, abbr, acronym, address, applet, b, basefont, bdo, big, blockquote, br, button, center, cite, code, dfn, dir, div, dl, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, i, iframe, img, input, isindex, kbd, label, map, menu, noframes, noscript, object, ol, p, pre, q, s, samp, script, select, small, span, strike, strong, sub, sup, table, textarea, tt, u, ul, var

<button> Valid Context:

The <button> tag is valid within the following tags:
a, abbr, acronym, address, applet, b, bdo, big, blockquote, body, caption, center, cite, code, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, pre, q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var

  • button with text
    <form>
    <button type="submit" name="button1" value="clicked">
    Submit
    </button>
    </form>
    View

<button> Special Notes

  • Watch the whitespace in this element. Some browsers include it in the button while others don't. So you might end up with designs that don't look as you expect.

More <button> Information

< Previous | HTML 4.01 Tags / XHTML 1.0 Elements | Next >

Free XHTML 1.0 Class | HTML Validators | Free HTML 4.01 Class

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.