Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator


HTML <button> Tag


HTML <button> tag specifies a press/push button.

<button> tag use for submit a form information. <button> tag is a container tag.

Only Internet explorer submit the text between the <button> and </button> tag. All other web browser are submit the text using <input> tag.


Example-Code:

<button type="button">Click Here </button>
Online Try This Code Your Self....   »

Example-Result:


<button> Attributes

<button> tag supported following Dynamic attributes.:

Attributes Value Description
name "Name" Specifies the name on the button.
type button
reset
submit
Specify the value display.
Specify the data reset.
Specify the data submit.
value "Value" Specify the value to the button.

Dynamic Attributes

<button> tag supported following Dynamic attributes.:

Attributes Value Description
id ID_Name Declared unique id for the element.
class Predefined_Class Used in Cascading Style Sheet (CSS).
style style_Attributes CSS code specify inline the HTML element is presented.
title Title_Description Display on the "tooltip" for your elements.

Event Attributes

<button> tag supported following Event attributes.:

Attributes Value Description
onfocus "Java_script" element gets focus on object when script tobe run.
onblur "Java_script" element lose the focus on object when scrip tobe run.
onclick "Java_script" clicked on object when script tobe run.
ondblclick "Java_script" double click on object when script tobe run.
onkeydown "Java_script" key is pressed when script tobe run.
onkeypress "Java_script" key is pressed over element then released when script tobe run.
onkeyup "Java_script" key is released over element when script tobe run.
onmousedown "Java_script" mouse button was pressed over an element when script tobe run.
onmouseout "Java_script" mouse pointer release over an element when script tobe run.
onmousemove "Java_script" run mouse pointer moved when script tobe run.
onmouseover "Java_script" run mouse pointer move over when script tobe run.
onmouseup "Java_script" mouse button is released when script tobe run.