Courses / HTML
Free Beginner Web Development

HTML & Web Foundations

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.

24
Lessons
4 Weeks
Duration
33%
Progress

Lesson 9 of 24

16 min learning time

HTML Forms

Why forms matter

Forms allow users to enter information such as names, email addresses, passwords and messages.

Form controls

Common controls include input, textarea, select, option and button.

Example HTML
<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

Build it yourself

Create a simple contact form containing name, email and message fields.

Quick Check

Test your understanding

Which element is commonly used to collect a single line of text?