HTML Button Tag - Coding Tag

HTML BUTTON (<button>) Tag

by Jai 04-Jun-19

0 1045


The <button> tag is used to create clickable buttons on the web page (HTML document). HTML Button tag can be used both inside and outside of the form. When this button is used in the inside form, it works identical to the submit button and when it is used in an outside form then calling JavaScript function is mandatory.

One can use attributes like type="reset", type="button" and type="submit" while creating any button where, submit is used for submitting any form which is a default value, reset is used to reset form.

Syntax:

<button> </button> where content such as text or images can be integrated between start and end tag.


Code:

<!DOCTYPE html>
<html>
<head>
<title> Button Tag </title>
</head>
<body>
<h2> The Button Tag </h2>
<button name="button" type="button"> Click Me! </button>
</body>
</html>

Output:

HTML BUTTON (<button>) Tag


Share:


Leave a Reply


Comments
    Waiting for your comments