Toggle navigation
☰
HTML
CSS
Scripting
Database
<!DOCTYPE html> <html> <head> <title>Login Form Example</title> <style> body { font-family: sans-serif; background-color: #f0f2f5; margin: 0; display: flex; justify-content: center; align-items: center; height: 350px; /* Adjusted for scratchpad preview */ } .login-container { background-color: white; padding: 30px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); width: 300px; } .login-container h2 { margin-top: 0; margin-bottom: 20px; text-align: center; color: #333; } .form-group { margin-bottom: 15px; } label { display: block; margin-bottom: 5px; font-size: 14px; color: #555; } input[type="text"], input[type="password"] { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; } .login-button { width: 100%; padding: 10px; background-color: #1877f2; color: white; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 16px; } .login-button:hover { background-color: #166fe5; } .footer-links { margin-top: 15px; text-align: center; font-size: 13px; } .footer-links a { color: #1877f2; text-decoration: none; } .footer-links a:hover { text-decoration: underline; } </style> </head> <body> <div class="login-container"> <h2>Login</h2> <form action="/html/tags/html_form_tag.cfm" method="post"> <div class="form-group"> <label for="username">Email or Username</label> <input type="text" id="username" name="username" required> </div> <div class="form-group"> <label for="password">Password</label> <input type="password" id="password" name="password" required> </div> <button type="submit" class="login-button">Log In</button> </form> <div class="footer-links"> <a href="#">Forgot password?</a> · <a href="#">Sign up</a> </div> </div> </body> </html>