Enter HTML5 entry to proficient:<button> label

Source: Internet
Author: User
Keywords tags HTML5 Getting started to master

<button> Label

Definitions and usage

<button> Label definition button.

You can place content, such as text or images, in the button element. This is the difference between the element and the button created by the INPUT element.

Always specify the type attribute for the button. Different browsers use different default values based on the type attribute.

Instance

To mark a button:

<button type= "button" >click me!</button>

Try it for yourself.

Differences between HTML 4.01 and HTML 5

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

Tips and comments

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.

Property

Property value describes Autofocusnew autofocus if set, the button gets the focus when the page loads. Disabled disabled disables the button. Formnew form_http://www.aliyun.com/zixun/aggregation/11696.html "&gt;name Specify which form the button belongs to. The Formactionnew URL stipulates where the form data is submitted when the form is submitted. Overrides the Action property of the form. Formenctypenew See the annotation rules how to encode the form data before it is sent to the server. Overrides the Enctype property of the form. The formmethodnew delete get post set provides a way to send form data. Overrides the form's Method property. Formnovalidatenew Formnovalidate If setting indicates whether the form is validated at commit time. Overrides the Novalidate property of the form. Formtargetnew _blank _self Specify where to open the URL in the action. Overwrites the target attribute of the form. The name button_name the _parent _top framename name. Type button reset submit to define the types of buttons. Value Some_value Specify the initial value of the button. Can be modified by the script.

Note: The possible value of the Formenctypenew property:

application/x-www-form-urlencoded

Multipart/form-data

FileType

Standard properties

<button> tags support standard properties in HTML 5.

Event Properties

<button> tags support event properties in HTML 5.

Related Article

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.