Logo
  Sunday, May 20, 2012
Sign-In  |  Sign-Up  |  Contact Us  | Bookmark |  RSS Feed

HTML5 Tutorial FeedBurner

The HTML5 <button> tag  
The HTML5 <button> tag is an element in HTML5 which defines a clickable button. The HTML5 <button> tag is used by inserting a button element on the document. This can be clicked to perform a defined action. Inside the HTML5 <button> element is where you can put content like simple text or even images. That is what defines the main difference between this element and the other buttons created with the use of the <input> command.

The HTML5 <button> tag is needed when it comes to creating visual buttons on the document. Adding the attributes is important for it to be set. There are also differences in HTML4.01 and HTML5 since there are new attributes that can be utilized. Here are the attributes for the HTML5 <button> element:

Attribute

Value

Description

autofocus (NEW)

autofocus

Autofocus on the button when page loads

Disabled

disabled

Disable button on load

form (NEW)

form_id

Specifies form button belongs to

formaction (New)

URL

Identifies location where to send data type="submit"

formenctype (NEW)

application/x-www-form-urlencoded
multipart/form-data
text/plain

Identifies the way data should be encoded type="submit"

formmethod (NEW)

get
post

Identifies HTTP method to use for data submission. Only for type="submit"

formnovalidate (NEW)

formnovalidate

Identifies data that should be validated. Only for type="submit"

formtarget

_blank
_self
_parent
_top
framename

Set response location after data is submitted. Only for type="submit"

name

name

Identifies a name for the button

type

button
reset
submit 

Identifies the type of button

value

text

Identifies an initial value for the button

The HTML5 <button> tag is supported in all major browsers such as , Internet Explorer, Firefox, Opera, Google Chrome, and Safari.

The HTML5 <button> tag is compatible with the Global Attributes in HTML5 and the Event Attributes in HTML5 as well.

Print HTML5 <button> tag Bookmark HTML5 <button> tag

Related Articles  
The HTML5 <track> tag
The HTML5 <track> tag is capable of defining the succeeding track for the <audio> and <video> ...
The HTML5 <s> Tag
If it is necessary to indicate within a document that a particular text is no longer correct, accurate, relevant or ...
The HTML5 <sub> Tag
The HTML5 <sub> tag is used for making sure that the character will appear half a character below the baseline.
The HTML5 <center> Tag
The <center> tag is no longer used for HTML5. Before, it is used for putting text and content in center-align ...
The HTML5 <title> Tag
The HTML5 <title> tag is very important in creating HTML documents because it has the ability to add title, ...
The HTML5 <iframe> Tag
There are times when inserting or embedding another document within an HTML document is necessary. During such ...
More