Account
Categories

Buttons in HTML


Different types of buttons are available in HTML forms to submit data, clear form fields, and perform various actions on a webpage.

  • Submit Button

    Definition:

    It sends all the form data to the server or database when the user clicks the button.

    Syntax:

    <input type="submit">
    

    Example:

    <input type="submit" value="Submit">
    

    Output:

  • Reset Button

    Definition:

    It clears all entered data in the form when clicked.

    Syntax:

    <input type="reset">
    

    Example:

    <input type="reset" value="Reset">
    

    Output:

  • Button

    Definition:

    It creates a simple, clickable button used for custom actions on a webpage.

    Syntax:

    <input type="button">
    

    Example:

    <input type="button" value="Click Me">
    

    Output: