Content · Web Development · HTML

HTML multiple Attribute: Reference and Examples

A clear, practical attribute reference to multiple. Learn when to use it, see working HTML, and avoid common mistakes.

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

The multiple attribute is a small instruction attached to an HTML element. Its job is to permit more than one file or selected option. It is easier to remember when you can see it in a real piece of markup.

What multiple is used for


Permit more than one file or selected option. The attribute appears inside an element’s opening tag. Depending on its definition, it may take a specific string, a number, an enumerated keyword, or be a boolean attribute.

The example below uses it in a file context. Other elements may support it too, or may give the same attribute a different meaning.

Example you can try


<form action="/upload" method="post" enctype="multipart/form-data">
    <label for="attachment">Attach a file</label>
    <input id="attachment" name="attachment" type="file" multiple>
    <button type="submit">Upload</button>
</form>

How the example works


Look for multiple in the snippet. Here the example shows its presence without a string value. This is a concrete input the browser can interpret; it is not just text shown to the reader.

A file field with multiple returns multiple selected files. An email field with multiple accepts a comma-separated address list.

Values and important behavior


Use the value format shown by the HTML definition. Do not assume that a value accepted in one attribute also works in another. When a browser ignores an invalid value, inspect the element and correct the markup.

This detail matters most when the page receives user input, navigates to another document, or loads an external resource. In those cases, check the browser behavior and any server-side requirements separately.

Small practice task


Copy the code and change multiple to another sensible value, or remove it entirely if it is optional. Test the difference in the browser and inspect any submitted value or network request.

Common Beginner Mistakes


  • A file field with multiple returns multiple selected files. An email field with multiple accepts a comma-separated address list.
  • Using multiple on an element that does not support it.
  • Believing that an HTML hint or client-side check replaces real server validation or a security policy.

Key Takeaways


  • multiple is used to permit more than one file or selected option.
  • A file field with multiple returns multiple selected files. An email field with multiple accepts a comma-separated address list.
  • Choose valid values and test the result instead of guessing what the browser will do.
Share this resourceSend this page to someone who may find it useful.