Why forms matter
Forms allow users to enter information such as names, email addresses, passwords and messages.
Learn how websites are structured from the ground up using HTML. Build real pages while learning elements, attributes, links, images, forms, tables, semantic HTML and more.
Lesson 9 of 24
16 min learning time
Forms allow users to enter information such as names, email addresses, passwords and messages.
Common controls include input, textarea, select, option and button.
<form>
<label for="name">Your Name</label>
<input
type="text"
id="name"
name="name"
placeholder="Enter your name"
>
<br><br>
<button type="submit">
Send
</button>
</form>
Practical Exercise
Create a simple contact form containing name, email and message fields.
Quick Check
Which element is commonly used to collect a single line of text?