Content · Web Development · HTML

HTML Product Filter Form with Checkboxes and Select Lists

Product Filter Form with Checkboxes and Select Lists: GET submits the selected filters in the URL, making search filters easy to bookmark and share. Includes a practical HTML example and an explanation.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

Think of filling out a sign-up page. Clear fields make the job simple; confusing fields make people leave.

What You Need to Know


GET submits the selected filters in the URL, making search filters easy to bookmark and share.

Try the Example


Take a look at the example. We’ll explain the important lines right below it.

<form action="/products" method="get">
    <fieldset>
        <legend>Product types</legend>
        <label><input type="checkbox" name="type" value="books"> Books</label>
        <label><input type="checkbox" name="type" value="games"> Games</label>
    </fieldset>
    <label for="price-range">Price range</label>
    <select id="price-range" name="price">
        <option value="any">Any price</option>
        <option value="under-25">Under 25</option>
    </select>
    <button type="submit">Filter results</button>
</form>

Let’s Read the Code


  • for: For connects a label or output with a control by ID.
  • <form>: The form groups controls and identifies where submitted data goes.
  • <fieldset>: The fieldset keeps related choices together.
  • type: Type changes what sort of control or resource the browser uses.

Read the named elements and attributes together. They explain how the browser connects this feature to the rest of the page.

What Happens in the Browser?


The HTML controls work in the browser, but saving an answer requires the example action path to be handled by a real server.

What gets sent? With ordinary form submission, the browser builds a set of name/value entries. For checkboxes, only checked choices are normally included. Radio buttons in the same group contribute one selected value. Open the browser Network panel to see the request rather than guessing.

Your Turn


Choose two product types and see how repeated type parameters appear in the URL.

Common Beginner Mistakes


  • Copying the example without giving the fields a clear label and a usable name.
  • Only checked boxes are submitted; the server must handle missing type values.

Key Takeaways


  • A control needs a clear label and, when submitted, a meaningful name and value.
  • for: For connects a label or output with a control by ID.
  • Remember that HTML form rules help the visitor, but server-side code must decide whether received data is valid.
Share this resourceSend this page to someone who may find it useful.