HTML

Login Form (with autocomplete hints)

admin by @admin ADMIN
Jun 15, 2026
May 31, 2026
Public
0 0 up · 0 down Sign in to vote
A complete login form with the autocomplete attributes that browsers + password managers depend on. Missing these causes 1Password, Bitwarden, and Chrome to mis-detect the form.
HTML
Raw
<form action="/login" method="post">
    <label for="login-user">Username or Email</label>
    <input
        type="text"
        id="login-user"
        name="username"
        autocomplete="username"
        autocapitalize="off"
        autocorrect="off"
        spellcheck="false"
        required>

    <label for="login-pass">Password</label>
    <input
        type="password"
        id="login-pass"
        name="password"
        autocomplete="current-password"
        minlength="8"
        required>

    <label>
        <input type="checkbox" name="remember" value="1">
        Remember me for 30 days
    </label>

    <button type="submit">Sign in</button>

    <p>
        <a href="/forgot-password">Forgot password?</a> ·
        <a href="/register">Create account</a>
    </p>
</form>
Tags

Save your own code snippets

Create a free account and build your private vault. Share publicly whenever you want.