button
button
This page has been flagged with the following issues:
High-level issues:
Summary
The button element (<button>) defines a clickable button.
Overview Table
| DOM Interface | HTMLButtonElement |
|---|
Inside a <button> element you can put content, like text or images. Always specify the type attribute for a <button> element. Different browsers use different default types for the <button> element.
Examples
HTML
<button name="button">Click me</button>
Usage
Internet Explorer historically has had problems with the button element, especially when used in conjunction with type="submit".
Notes
Remarks
The default value of the type attribute depends on the current document compatibility mode. The default value is submit. In other compatibility modes the default value is button.
When the BUTTON element is submitted in a form, the value depends on the current document compatibility mode.
Windows Internet Explorer 8 and later. The default value of the type attribute depends on the current document compatibility mode. In IE8 Standards mode, the default value is submit. In other compatibility modes and earlier versions of Windows Internet Explorer, the default value is button.
Internet Explorer 8 and later. When the BUTTON element is submitted in a form, the value depends on the current document compatibility mode. In IE8 mode, the value attribute is submitted. In other document modes and earlier versions of Internet Explorer, the innerText value is submitted.
[ie_htmlref\ie:%20button element | button object%20 RELEASE:%20(7/24/2012)&body=%0A%0APRIVACY STATEMENT%0A%0AThe doc team uses your feedback to improve the documentation. We don't use your email address for any other purpose. We'll remove your email address from our system after the issue that you are reporting is resolved. While we are working to resolve this issue, we may send you an email message to request more info about your feedback. After the issue is addressed, we may send you an email message to let you know that your feedback has been addressed.%0A%0AFor more info about Microsoft's privacy policy, see http://privacy.microsoft.com/en-us/default.aspx. Send comments about this topic to Microsoft]
Build date: 7/24/2012
Standards information
- HTML 4.01 Specification, Section 17.5
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.10.8
HTML information
{
Compatibility
Desktop
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic Support | Supported (when?) | Supported (when?) | Supported (when?) | |
Supported (when?) |
Mobile
| Feature | Android | BlackBerry | Chrome for mobile | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Opera Mini | Safari Mobile |
|---|---|---|---|---|---|---|---|---|
| Basic Support | Supported (when?) | ? | Supported (when?) | ? | ? | ? | ? | Supported (when?) |
See also
Related articles
Document Structure
- button
HTML
- button
Mobile
- button
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]
This tool helps to make and review comments inline.
How to Use
insert instructions, with images, here