Pr.Pg Next Pg

<BUTTON>..</BUTTON> tag tutorials

  • The <button> tag defines a clickable button.

  • Inside a <BUTTON> element you can put content, like text or images. This is the difference between this element and buttons created with the <INPUT> element.

  • The <BUTTON> tag is supported in all major browsers.

Note: If you use the <BUTTON> element in an HTML form, different browsers may submit different values. Use<INPUT> to create buttons in an HTML form.

  • The below table shows the attribute of <BUTTON> tag:

 

Sr No

Attributes

Descriptions

1

Name

This attribute specify a name for the button..

2

Type

This attribute specify the type of button reset/submit/button.

3

Form method

This attribute specify how to send the form-data (which HTTP method to use). Only for TYPE=SUBMIT.

4

Form target

This attribute specifies where to display the response after submitting the form. Only for TYPE=SUBMIT.

5

Disabled

This attribute specifies that a button should be disabled.

 

Syntax:

<body>

<button>some text</button>

</body>

 

Example: HTML program to demonstrate button element

Output:
Pr.Pg border                                              Next Pg