Skip to content
Related Articles

Related Articles

Improve Article

HTML | <input type = "button">

  • Last Updated : 28 May, 2019
Geek Week

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 <input type = "button"></h2>
    <input type="button"
           onclick="send()" 
           value="submit">
    <script>
        function send() {
            alert("Hello World");
        }
    </script>
</body>
  
</html>

Output:

Supported Browsers:

  • Google Chrome 1.0
  • Firefox 1.0
  • Edge
  • Opera
  • Apple Safari 1.0

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :