Open In App

HTML | <input type = "button">

The HTML <input type = “button”> is used to define a clickable Button in a Document. It is mostly used with the Javascript to activate the script. 

Syntax: 



<input type="button"> 

Example: 




<html>
 
<head>
    <title>
        HTML input type="button"
    </title>
</head>
 
<body style="text-align:center;">
    <h1>GeeksForGeeks</h1>
    <h2>HTML &lt;input type = "button"&gt;</h2>
    <input type="button"
           onclick="send()"
           value="submit">
    <script>
        function send() {
            alert("Hello World");
        }
    </script>
</body>
 
</html>

Output: 



 

Supported Browsers:

Article Tags :