Arkain
7
Q:

login form in html

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body ,html{font-family: Arial, Helvetica, sans-serif;;}
form{
    width:fit-content;
    padding: 60px;
   
   
    height:fit-content;
    margin:0 auto;
    margin-top: 2%;
    background-color: #f9f9f9
}
/* Full-width input fields */
.form-control {
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Set a style for all buttons */
button{
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  width: 60%;
  margin: 5px auto;
  padding: 15px;
      box-shadow: 0px 5px 5px #ccc;
      border-radius: 5px;
      border-top: 1px solid #e9e9e9;
  display:block;
  text-align:center;
}
.signup{
    background-color:blue;
    margin-bottom:20px;
}
.login-box {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      padding: 15px;
      background-color: #fff;
      box-shadow: 0px 5px 5px #ccc;
      border-radius: 5px;
      border-top: 1px solid #e9e9e9;
    }
button:hover,#btn-signup:hover {
  opacity: 0.8;
}



/* Center the image and position the close button */
.imgcontainer {
  text-align: center;
  margin: 24px 0 12px 0;
  position: relative;
}

img.avatar {
  width: 40%;
  border-radius: 50%;
}

.container {
  padding: 16px;
}

span.psw {
  float: right;
  padding-top: 16px;
}

h2,p{
    text-align:center;
}



/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
  span.psw {
     display: block;
     float: none;
  }
  
}
</style>
</head>
<body>



  
  <form  action="/action_page.php" method="post">

    <h2>Welcome To Newscongragated</h2>
    <p>Sign in</p>
    <div class="container">
      
      <label for="email"><b>Email</b></label>
          <input
            type="email"
            class="form-control"
            id="email"
            placeholder="Enter your email"
                 required pattern='/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/'>

     

      <label for="name"><b>Password</b</label>
          <input
            type="password"
            class="form-control"
            id="password"
            placeholder="Enter your password"
                 minlength="8"
                 required>
        
      <button type="submit">Login</button>
      <button type="button" onclick="window.location.href='signup.php'"
       
          class="signup" >
            Sign Up
        </button>
      <a href="./resetpassword.php">Forgot your password? </a>

      
    </div>

    

    
  </form>


</body>
</html>
1
<form name="loginForm" method="post" action="index.html">
      <table width="20%" bgcolor="0099CC" align="center">
        
          <tr>
        <td colspan=2><center><font size=4><b>Login</b></font></center></td>
        </tr>
        
        <tr>
        <td><input type="text" placeholder="Username" style="font-family: Roboto, sans-serif; outline: 1; background: #f2f2f2; width: 100%; border: 0; margin: 0 0 15px; padding: 15px; box-sizing: border-box; font-size: 14px;" size=25 name="user"></td>
        </tr>
        
        <tr>
        <td><input type="Password" placeholder="Password" style="font-family: Roboto, sans-serif; outline: 1; background: #f2f2f2; width: 100%; border: 0; margin: 0 0 15px; padding: 15px; box-sizing: border-box; font-size: 14px;" size=25 name="pass"></td>
        </tr>
        
        <tr>
        <td><input type="submit" onclick="return check(this.form)" style="font-family: Roboto, sans-serif; text-transform: uppercase; outline: 0; background: #4CAF50; width: 100%; border: 0; padding: 15px; color: #ffffff; font-size: 14px; cursor: pointer;"></td>
        </tr>
        <h3 align="center">Tip: to apply for a username & password, DM Toxic Studios#0122</h3>
        </table>  
        </form>
       <script lang="javascript">
         function check(form)
        {
            var people = [
                {
                    username: "Toxic",
                    password: "lolo" 
                },
                {
                    username: "Wobbly",
                    password: "cool"
                }
            ]
            for (i = 0; i < people.length; i++) {
                if (form.user.value == people[i].username && form.pass.value == people[i].password) {
                  return true;
                }
                else {
                  alert("Wrong password/username!")
                  return false;
                }
            }
            
        }
       </script>
1
<!doctype html>
<form name="loginForm" method="post" action="index.html">
<table width="20%" bgcolor="0099CC" align="center">
  <tr>
<td colspan=2><center><font size=4><b>light-net login</b></font></center></td>
</tr>

<tr>
<td>Username:</td>
<td><input type="text" size=25 name="user"></td>
</tr>

<tr>
<td>Password:</td>
<td><input type="Password" size=25 name="pass"></td>
</tr>

<tr>
<td ><input type="Reset"></td>
<td><input type="submit" onclick="return check(this.form)" value="Login"></td>
</tr>

</table>
</form>
<script language="javascript">
function check(form)
{

if(form.user.value == "public" && form.pass.value == "peasants")
{
	return true;
}
else
{
	alert("Error Password or Username")
	return false;
}
}
	      </script>
0
<html>
<head>
<title>Account</title>
<style>
body
{
	background-color:#ffda08;
}
table
{
	border:1px white;
	margin-top:200px;
	margin-left:500px;
	background-color:white;
	padding:20px
}
#btn
{
	width:200px;
	height:50px;
	background-color:#1ee3d2;
}

</style>
</head>
<body>
	<form name=frmNewAcc>
		<table border=0 cellspacing=5px>
	<tr>
		<th colspan=3><input class=in =text name=txtuname placeholder="Enter your account name"></th>
	</tr>
	<tr>
		<th colspan=3><input class=in type=password name=txtupass placeholder="Enter your new password"></th>
	</tr>
	<tr>
		<th colspan=3><input  class=in type=password name=txtuconfirmpass placeholder="Enter confirmed password"></th>
	</tr>
	<tr>
		<th colspan=3><input id=btn type=button value="Create new account"></th>
		<a href="Login task 1.html">Go back to login</a>
	</tr>

	
</table>
</form>
</body>
</html>

	
1
<html>
<head>
<title>Login</title>
<style>
body
{
	background-color:#66A62B;
}
table
{
	border:2px white;
	margin-top:200px;
	margin-left:500px;
	background-color:white;
	padding:30px
}
#btn
{
	width:200px;
	height:50px;
	background-color:#65C452
}
.in
{
	border:1px solid black;
	background-color:#c5ccc4;
	padding:6px 8px;
	border-radius:4px
}
	

</style>
</head>
<body>
	<form name=frmLogin id=form>
		<table border=0 cellspacing=5px>
		<tr>
			<th colspan=2 align=center><input type=text class=in name=txtuname placeholder="username"></th>
		</tr>
		<tr>
			<td colspan=2 align=center><input type=password
			class=in name=txtupass placeholder="password"></td>
		</tr>
		<tr>
			<td colspan=2 align=center><input id=btn type=button
			value=LOGIN placeholder="password"></td>
		</tr>
		<tr>
			<td>Not registered?<a href=ddd.html>Create an account</a></td>
		</tr>
</table>
</form>
</body>
  
0

  <form action="action_page.php" method="post">
  <div class="imgcontainer">
    
<img src="img_avatar2.png" alt="Avatar" 
class="avatar">
  </div>

  <div 
class="container">
    <label for="uname"><b>Username</b></label>
    
<input type="text" placeholder="Enter Username" name="uname" required>


    <label for="psw"><b>Password</b></label>
    
<input type="password" placeholder="Enter Password" name="psw" required>

    
<button type="submit">Login</button>
    
  <label>
      <input 
type="checkbox" checked="checked" name="remember"> Remember me
    
  </label>
  </div>

  
<div class="container" style="background-color:#f1f1f1">
    
<button type="button" class="cancelbtn">Cancel</button>
    
<span class="psw">Forgot <a href="#">password?</a></span>
  </div>
</form> 
0
{% extends '!!!!!ALERT_CHANGE_THIS_ALERT!!!!!!!/base.html' %}
{% load crispy_forms_tags %}

{% block title %}
<title>Login</title>
{% endblock %}

{% block body %}
<div class="container">
    <div class="row justify-content-center mt-5">
        <div class="col-5 border shadow rounded p-4">
            <h1 class="font-weight-lighter text-center">Login</h1>
            <form method="POST">
                {% csrf_token %}
                {{ form | crispy }}
                <button class="btn btn-outline-secondary btn-block mt-4">
                    Login
                </button>
            </form>
        </div>
    </div>
</div>
{% endblock %}
0

New to Communities?

Join the community