Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>The autocomplete attribute</h1> <p>Here we have a form with the autocomplete attribute set to "new-password", meaning that we are expecting a new password here, so it is no need for the browser to try to fill in this form.</p> <form action="/action_page.php"> <label for="username">Username:</label> <input type="text" id="username" name="username"><br><br> <label for="password">Password:</label> <input type="password" id="password" name="password" autocomplete="new-password"><br><br> <input type="submit"> </form> <p>Here is what happens if we remove the autocomplete="new-password" attribute:</p> <form action="/action_page.php"> <label for="username">Username:</label> <input type="text" id="username" name="username"><br><br> <label for="password">Password:</label> <input type="password" id="password" name="password"><br><br> <input type="submit"> </form> </body> </html>