Open In App
Related Articles

HTML | <input type = "button">

Improve Article
Improve
Save Article
Save
Like Article
Like

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




<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:

  • Google Chrome 1.0 and above
  • Firefox 1.0 and above
  • Edge 12 and above
  • Opera
  • Apple Safari 1.0 and above
  • Internet Explorer
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 22 Jul, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials