html button tag

 Html Button Tag 

web designing theory
button Tag html

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


Button Tag program 


<!DOCTYPE html>

<html>

<body>

<h2>Input Button</h2>

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

 </body>

</html>

html button tag 

Explain Program

Step 1 ]

<!DOCTYPE html>

  •  document type declaration.
  • browser help this is an HTML5 document.

Step 2 ]  

. <html> ... </html>

  • root element of the HTML document.
  • <html> tag is part of the web page.

Step 3 ]  

<body> ... </body>

  • HTML document that holds visible content on the page.
    • A heading (<h2>)
    • An input button (<input type="button">)
    • list tag 
    • ext...

Step 4 ]  

. <h2>Input Button</h2>

  •  heading tag.
  • heading tag  Displays the text "Input Button" on the page.
  •  <h2> instead of <h1>
    • <h1>  use for the main title.
    • <h2> subheading 

Step 5 ]  

<input type="button" >

  • input element of type button.
  • Renders a clickable button.

Step 6 ]  

Button Tag output 


web designing  theory

Related Post:-


HTML table attribute

html table attribute in html

html list attribute tag

Comments

Popular posts from this blog

What Is CSS Text Color in 2026

CSS Padding Property Explained

CSS Outline Color Property in 2026