BUTTON in HTML

22 - 06-Oct-2024
Introduction

Button is displayed either by using <input> tag or <button> tag. We prefer using <button> tag.

<input> tag requires the type attribute to set as button as shown in the below code example
<input type="button" value="Submit" />

<button> tag is a paired tag and it has 3 types defined in it button, submit and reset.

  1. button : Used for firing the JavaScript functions
  2. submit : used to submit the form
  3. reset : Used to reset all the fields of the form

Output
<input type="button" value="Submit" />


<button type="button">Submit</button>

Comments
Load more comments.
Please Login or Sign up to comment.

Search Gyanva

Press "Enter" to search.

More from Publication

What we offer ?

We offer you a platform to publish your experience, knowledge and research with rest of the world. All you need is to sign up and create your own publication on Gyanva.
logo
facebook youtube