HTML Email Input Generator
WM-54Describe the field and get an accessible email input: a linked label, an optional hint, and the right autocomplete token.
Runs in your browser. Nothing is uploaded.
Attribute lines: label:, name:, id:, value:, placeholder:, maxlength:, hint:
HTML
How to use it
- Write label: and name:, plus optional placeholder:, value:, maxlength: and hint: lines.
- Tick Required or Allow several addresses if you need them.
- Choose the autocomplete token, label style and an optional form wrapper.
- Copy the HTML into your page.
What type=email checks
A browser validates an email input against a single-address pattern defined in the HTML standard. It is deliberately looser than the full email address rules, so a value like name@localhost is accepted, and it also strips spaces from the start and end. It does not check that the domain exists or that the mailbox is real. Treat the browser check as a friendly first pass, and validate again on the server, because anyone can send a request that skips the form.
Several addresses and autocomplete
With the multiple attribute the field accepts a comma-separated list and checks each address. The autocomplete attribute tells the browser what to fill in: email is the token for an email address, and username suits sign-in fields where the email is the account name. A phone keyboard also usually shows the at sign for this input type. A placeholder such as [email protected] is a hint only; it vanishes while typing, so the label line is required.
Hints and labels the tool writes
The label is linked to the input with for and id, or the input can sit inside the label. A hint line is written in a small element and attached with aria-describedby so a screen reader reads it after the label. If you wrap the field in a form, the tool adds a submit button and uses the action you give; an address starting with javascript: is refused. All text is escaped.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Missing label. Add a line such as "label: Email address"; every input needs a visible label. | The input has no label: line. | Add label: and the text users should see. |
Questions people ask
What does the browser check on an email input?
That the value looks like one address, with text, an at sign and a host part, by a pattern in the HTML standard. It does not confirm the mailbox exists. Always validate on the server too.
Is name@localhost a valid email in HTML?
Yes, the pattern in the standard accepts a host without a dot, so a@b is valid for an email input. If you need a dot in the domain, add a pattern attribute or check it in your own code.
How do I allow more than one email address?
Add the multiple attribute. Users then type addresses separated by commas, and each one is checked. Tick the multiple option in this tool to add it.
Which autocomplete value should an email field use?
Use email for an address field. Use username when the address is the sign-in name. The tool offers both, and off if you do not want the browser to suggest values.
Why is a label required instead of a placeholder?
A placeholder disappears as soon as you type and is not a reliable name for assistive technology. A visible label stays on screen and is read aloud, so every generated input has one.
About this tool
Builds a label and an input of type email. The browser checks the value against a single-address pattern defined by the HTML standard; it is not a full email address validator, and a value such as name@localhost passes. The Multiple option lets users enter several addresses separated by commas. Autocomplete lets you pick off, email or username. A hint line is shown in a small element and linked to the input with aria-describedby. Always validate on the server as well, since browser checks can be bypassed. Values are escaped.