Creating your first form in HTML5

Creating your first form in HTML5

The <form> tag is used to create the form.

Syntax

<form>
content is written here
</form>

The <form> tag contains the content of the form. This content is called form widgets, controls or fields.

Here, we will illustrate a simple example of a form with two input fields and a submit button.

 Code

Output

 

 

In the above example, you have seen in the code that the input fields are defined by the <input> element. The input element represents a typed data field, which the user can edit. The button is also defined using the <input> element.