Account
Categories

HTML Forms


It creates a form structure on a webpage, uses different HTML form tags, and collects and organizes user details such as name, date of birth, and mobile number. Along with this, many buttons are available in forms that help the user send the data on a webpage, such as the submit button and other form buttons.

Syntax:

<form>
<label>Name:</label>
<input type="text">

<br><br>

<label>Email:</label>
<input type="email">

<br><br>

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

Where:

<form> → It is used to create an HTML form with all input fields.

<label> → It is used to define the name or title of an input field (like Name, Email).

<input type="text"> → It is used to enter text (a string), such as a name.

<input type="email"> → It is used to enter email addresses.

<br><br> → It is used to add line breaks for proper spacing.

<button type="submit"> → It is used to submit all form data.