ad

Showing posts with label How to Use the HTML Button Input. Show all posts
Showing posts with label How to Use the HTML Button Input. Show all posts

Tuesday, September 30, 2025

How to Use the HTML Button Input

How to Use the HTML Button Inputhttps://webdesigningtheory.blogspot.com


Syntax :-

<input type="button"> 

Buttons are created as the final component of any form. A button lets the user trigger son events like submission of data, upload/download or any kind of alert/message.


How to Use the HTML Button Input


<!DOCTYPE html>

<html>

<body>

<h2>Input Button</h2>

<input type="button" onclick="alert('Hello World!')"value="Click Me!">

 </body>

</html>

How to Use the HTML Button Input

Explain Program

Step 1 ]

<!Doctype html>

  • <!doctype html>  always be the first line of any HTML document.

Step 2 ]

   <html> and </html>

   html  is the root element.

Step 3 ]

<body> and </body>

body  is  main content area.

All visible content inside to  the <body> tag

Step 4]

<h2>Input Button</h2>

heading   type  Input Button

Step 5]

<input type="button" onclick="alert('Hello World!')"value="Click Me!">

1)  type ="button" - <button> tag html use creating interactive web page.
2)  onclick="alert('Hello World!')" - JavaScript onclick  web page
                      onclick buttton use -   web page are static page

How to Use the HTML Button Input

Button Tag output 


Button Tag output
Related Post :-