HTML5  button tag, Implementation of button <button>tag.


 

HTML5  button tag, Implementation of button <button>tag.

In this section, you will see the use of <button> tag in html5.

In this section, you will see the use of <button> tag in html5.

HTML5  button tag, Implementation of button <button>tag.

Introduction:

In this section, we will introduce you to the button <button> tag. Button tag is used for showing button on screen or at browser. It is a pair tag. Content inside the button tag will be display as name of button.
you can put image or text inside the button tag. But input tag does not support it.

Attributes of button tag:

1-autofocus
2-disabled
3-form
4-formaction
5-formenctype
6-formmethod
6-formnovalidate
7-formtarget
8-name
9-type
10-value

Declaration Syntax :

Declaration syntax of button tag in HTML5.

                            <button>Text area </button>

The declaration of break line is case_ insensitive.

Example of <button > in HTML5:

Code:
ButtonTag.html
<!DOCTYPE html>
<html >
<head>
<title> Insert title of document.  </title>
</head>
<body>
<p><b>Example of button tag in HTML5.</b></p>
<button type="button" >Click here.</button>
</body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

In HTML5,  button tag supports some new attributes like autofocus, form, formmethod, formtarget etc. but HTML4.01 not supports them.

Ads