The BUTTON tag defines a versatile button element for XHTML forms.
- Chrome 1, 2, 3, 4, 5
- Firefox 1, 2, 3
- Internet Explorer 4, 5, 6, 7, 8
- Netscape 6, 7, 8
- Opera 6, 7, 8, 9, 10
- Safari 1, 2, 3, 4, 5
HTML Versions
CDATA. Encloses HTML tags that make up the input button, usually an image. The following tags are valid within the BUTTON tag:
a,
abbr,
acronym,
address,
applet,
b,
bdo,
big,
blockquote,
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,
mao,
menu,
noframes,
noscript,
object,
ol,
p,
pre,
q,
s,
samp,
script,
select,
small,
span,
strike,
strong,
sub,
sup,
table,
textarea,
tt,
u,
ul,
var
The BUTTON tag is valid within the following tags:
a,
abbr,
acronym,
address,
applet,
b,
bdo,
big,
blockquote,
body,
caption,
center,
cite,
code,
del,
dd,
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 action="#">
<button type="submit" name="button1" value="clicked">
Submit
</button>
</form>
See the button with text on a web page.
button with an image
<form action="#">
<button type="submit" name="button1" value="clicked">
<img src="cecb2.gif" width="32" height="32" alt="submit" border="0" />
</button>
</form>
See the button with an image on a web 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>
See the button with both image and text on a web page.
- 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.

