How To Make A Button In Html

Table of contents:

How To Make A Button In Html
How To Make A Button In Html

Video: How To Make A Button In Html

Video: How To Make A Button In Html
Video: HTML how to add buttons 🛎️ #9 2024, May
Anonim

Buttons are created in HTML using the and tags. They are an integral part of almost any interface and help send the necessary information to the handler script or clean up already filled forms.

How to make a button in html
How to make a button in html

Instructions

Step 1

Using the descriptor adds a button named name and value to the page. The name attribute gives the element a unique identifier and is used by the form processor to determine its value. Value puts the required text on top. For example, to create a button, write the following code:

This command will create a button with the name button and the caption "Submit" on it.

Step 2

The descriptor creates a similar element, but offers many additional parameters for use that a web developer might need. So, you can overlay a table or image, formatted text or a list on top. For example:

Text

Step 3

The form attribute specifies the identifier of the form that will be used to process the data. Formaction sets up a form handler in another part of the document, another file, or a site. Formmethod is responsible for defining the method for transferring data. Name specifies the name of the button, type - the type (normal, for submitting data or for clearing the form). Value - the value that will be read by scripts. The button will display an image with the specified address and bold text.

Step 4

To create a button that will process the entered data, you must specify the appropriate type in the attribute:

To create a button that clears user input, set type = “reset”.

Recommended: