Home Tutorials HTML Tutorial Forms
Forms

Forms


25. Forms

Forms collect user input using <form> and various form controls. HTML5 added more input types and constraint validation to simplify client-side form checking.

Syntax

<form action="/submit">
    <input type="text">
</form>

Example

<form>
    <label>Name:</label>
    <input type="text" name="name">
    <input type="submit" value="Send">
</form>

Output

A text box and a Send button appear.
Example

🏋️ Test Yourself With Exercises

Take our quiz on Forms to test your knowledge.

Browse Quizzes »