HTML <button> Tags

Source: Internet
Author: User
Tags button type html form

Instance

The following code marks a button:

<button type= "button" > Buttons!</button>


Definition and usage

<button> tag defines a button.

Inside the button element, you can place content, such as text or an image. This is the difference between the element and the button created by using the INPUT element.

<button> controls provide more powerful functionality and richer content than <input type= "button" >. All content between <button> and </button> tags is the content of the button, including any acceptable body content, such as text or multimedia content. For example, we can include an image and related text in the button and use them to create an attractive tag image in the button.

The only prohibited element is an image map because its mouse-and keyboard-sensitive actions interfere with the behavior of the form button.

Always specify the Type property for the button. The default type of Internet Explorer is "button", while the default value for other browsers, including the specifications, is "submit".

Differences between HTML 4.01 and HTML 5

New properties in HTML 5: Autofocus, form, formaction, Formenctype, FormMethod, Formnovalidate and Formtarget.

Hints and Notes

Note: If you use the button element in an HTML form, different browsers submit different button values. Use the INPUT element to create a button in an HTML form.

HTML <button> Tags

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.