Login Form

<!DOCTYPE html>
<html>
<head>
  <style>
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #f0f0f0;
  font-family: Arial, sans-serif;
}
.login-box {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  width: 300px;
}
.login-box h2 {
  text-align: center;
  margin-bottom: 20px;
}
.login-box input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.login-box button {
  width: 100%;
  padding: 10px;
  background: blue;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.login-box button:hover {
  background: darkblue;
}
</style> </head> <body> <div class="login-box">
&lt;h2&gt;Login&lt;/h2&gt;
&lt;input type="text" placeholder="Username"&gt;
&lt;input type="password" placeholder="Password"&gt;
&lt;button&gt;Login&lt;/button&gt;
</div> </body> </html>

Explanation:

  • box-shadow gives depth.
  • input and button styled for modern UI.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *