ad

Thursday, October 26, 2023

How to create simple login form use HTML and CSS



Creating Sample Login Form Using HTML

 Login Form


Login form

What is a login form?

 

     Almost every website and application uses login credentials. The login form uses the user's credentials to verify access rights. It usually consists of a username or email and a password. However, more fields can be added to make the site more    secure.


PROGRAM :CODE

Login form







<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @import url('https://fonts.googleapis.com/css?family=Raleway:400,700');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Raleway, sans-serif;
}

body {
    background: linear-gradient(90deg, #c1bbf3);        
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.screen {      
    background: linear-gradient(90deg,  #a09af8);      
    position: relative;
    height: 600px;
    width: 360px;  
    box-shadow: 0px 0px 24px #5C5696;
}

.screen__content {
    z-index: 1;
    position: relative;
    height: 100%;
}

.screen__background {      
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);  
}

.screen__background__shape {
    transform: rotate(45deg);
    position: absolute;
}

.screen__background__shape1 {
    height: 520px;
    width: 520px;
    background: #FFF;  
    top: -50px;
    right: 120px;  
    border-radius: 0 72px 0 0;
}

.screen__background__shape2 {
    height: 220px;
    width: 220px;
    background: #6C63AC;    
    top: -172px;
    right: 0;  
    border-radius: 32px;
}

.screen__background__shape3 {
    height: 540px;
    width: 190px;
    background: linear-gradient(270deg, #5D54A4, #6A679E);
    top: -24px;
    right: 0;  
    border-radius: 32px;
}

.screen__background__shape4 {
    height: 400px;
    width: 200px;
    background: #aba7fa;    
    top: 420px;
    right: 50px;    
    border-radius: 60px;
}

.login {
    width: 320px;
    padding: 30px;
    padding-top: 156px;
}

.login__field {
    padding: 20px 0px;  
    position: relative;
}

.login__icon {
    position: absolute;
    top: 30px;
    color: #7875B5;
}

.login__input {
    border: none;
    border-bottom: 2px solid #D1D1D4;
    background: none;
    padding: 10px;
    padding-left: 24px;
    font-weight: 700;
    width: 75%;
    transition: .2s;
}

.login__input:active,
.login__input:focus,
.login__input:hover {
    outline: none;
    border-bottom-color: #6A679E;
}

.login__submit {
    background: #fff;
    font-size: 14px;
    margin-top: 30px;
    padding: 16px 20px;
    border-radius: 26px;
    border: 1px solid #D4D3E8;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    width: 100%;
    color: #4C489D;
    box-shadow: 0px 2px 2px  rgb(40, 205, 205);
    cursor: pointer;
    transition: .2s;
}

.login__submit:active,
.login__submit:focus,
.login__submit:hover {
    border-color: #6A679E;
    outline: none;
}

.button__icon {
    font-size: 24px;
    margin-left: auto;
    color: #7875B5;
}

.social-login {
    position: absolute;
    height: 140px;
    width: 160px;
    text-align: center;
    bottom: 0px;
    right: 0px;
    color: #fff;
}

.social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-login__icon {
    padding: 20px 10px;
    color: #fff;
    text-decoration: none;  
    text-shadow: 0px 0px 8px #7875B5;
}

.social-login__icon:hover {
    transform: scale(1.5);  
}
  </style>
</head>
<body>
   

    <div class="container">
        <div class="screen">
            <div class="screen__content">
                <form class="login">
                    <div class="login__field">
                       
                        <span class="button_
_text "><h2>Login Form </h2></span><br><br>
                        <i class="login__icon
fas fa-user"></i>
                        <input type="text"
class="login__input" placeholder="User name
/ Email">
                    </div>
                    <div class="login__field">
                        <i class="login__icon
fas fa-lock"></i>
                        <input type="password"
class="login__input" placeholder="Password">
                    </div>
                    <button class="button
login__submit">
                        <span class="button_
_text">Log In Now</span>
                        <i class="button__icon
fas fa-chevron-right"></i>
                    </button>              
                </form>
                <div class="social-login">
                   
                    <div class="social-icons">
                        <a href="#" class="
social-login__icon fab fa-instagram"></a>
                        <a href="#" class="
social-login__icon fab fa-facebook"></a>
                        <a href="#" class="
social-login__icon fab fa-twitter"></a>
                    </div>
                </div>
            </div>
            <div class="screen__background">
                <span class="screen__background
__shape screen__background__shape4"></span>
                <span class="screen__background
__shape screen__background__shape3"></span>      
                <span class="screen__background
__shape screen__background__shape2"></span>
                <span class="screen__background
__shape screen__background__shape1"></span>
            </div>      
        </div>
    </div>

</body>
</html>

Login form 

OUTPUT 










Related Post 

👌👇👇👍

objects in javascript

php cookies

application of javascript turorial

Wednesday, October 25, 2023

How to create Login form

 


Creating Sample Login Form Using HTML

 Login Form


login form




  1]   What is login form?

 

Almost every website and application uses login credentials. The login form uses the user's credentials to verify access rights. It usually consists of a username or email and a password. However, you can add more fields to make your site more secure.

  

  2]  What is login ID & password?

An access certificate is a unique identifier (such as a username and password) that allows a user to identify themselves and log in to an online account. Failure to use secure passwords can render network security software and tools such as firewalls and VPNs ineffective.

Example 

Source CODE

Login form



<!DOCTYPE html>  
<html>  
<head>  
<meta name="viewport" content="width=device-width, initial-scale=1">  
<title> Login Page </title>  
<style>  
Body {  
  font-family: Calibri, Helvetica, sans-serif;  
  background-color:;  
}  
button {  
       background-color: #4CAF50;  
       width: 100%;  
        color: blue;  
        padding: 15px;  
        margin: 10px 0px;  
        border: none;  
        cursor: pointer;  
         }  
 form {  
        border: 3px solid #f1f1f1;  
    }  
 input[type=text], input[type=password] {  
        width: 100%;  
        margin: 8px 0;  
        padding: 12px 20px;  
        display: inline-block;  
        border: 2px solid violet;   ;  
        box-sizing: border-box;  
    }  
 button:hover {  
        opacity: 0.7;  
    }  
  .cancelbtn {  
        width: auto;  
        padding: 10px 18px;  
        margin: 10px 5px;  
    }  
       
     
 .container {  
        padding: 25px;  
        background-color: lightblue;  
    }  
</style>  
</head>    
<body>    
    <center> <h1> Login Form </h1> </center>  
    <form>  
        <div class="container">  
            <label>Username : </label>  
            <input type="text" placeholder="Enter Username" name="username" required>  
            <label>Password : </label>  
            <input type="password" placeholder="Enter Password" name="password" required>  
            <button type="submit"><b>Login</b></button>  
            <input type="checkbox" checked="checked"> Remember me  
            <button type="button" class="cancelbtn"> Cancel</button>  
            Forgot <a href="#"> password? </a>  
        </div>  
    </form>
    </body>
    </html>

Related Post 
👇👇👌👍

features of javascript

php program print square number pattern

Tuesday, October 24, 2023

how to create contact form HTML and CSS



Creating Sample Contact Us Form Using HTML


         Contact us form

contact us form

PROGRAM :CODE

Contact Us  form


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
 
  <link href="https://maxcdn.bootstrapcdn.com
/font-awesome/4.7.0/css/font-awesome.min.css"
rel="stylesheet" integrity="sha384-
wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+
QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
crossorigin="anonymous">
  <link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/
animate.css/3.5.2/animate.css" />
  </<link rel="stylesheet" href="style.css">
<style >
*{
  box-sizing: border-box;
}

body{
 
  color:#485e74;
  line-height:1.6;
  font-family: 'Segoe UI', Tahoma,
Geneva, Verdana, sans-serif;
  padding:1em;
}

.container{
  max-width:1170px;
  margin-left:auto;
  margin-right:auto;
  padding:1em;
}

ul{
  list-style: none;
  padding:0;
}

.brand{
  text-align: center;
}

.brand span{
  color:#fff;
}

.wrapper{
  box-shadow: 0 0 20px 0 rgba(72,94,116,0.7);
}

.wrapper > *{
  padding: 1em;
}

.company-info{
  background:#c9e6ff;
}

.company-info h3, .company-info ul{
  text-align: center;
  margin:0 0 1rem 0;
}

.contact{
  background:#f9feff;
}

/* FORM STYLES */
.contact form{
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap:20px;
}

.contact form label{
  display:block;
}

.contact form p{
  margin:0;
}

.contact form .full{
  grid-column: 1 / 3;
}

.contact form button, .contact form input,
.contact form textarea{
  width:100%;
  padding:1em;
  border:1px solid #c9e6ff;
}

.contact form button{
  background:#c9e6ff;
  border:0;
  text-transform: uppercase;
}

.contact form button:hover,.contact
form button:focus{
  background:#92bde7;
  color:#fff;
  outline:0;
  transition: background-color 2s ease-out;
}

.alert{
  text-align: center;
  padding:10px;
  background:#79c879;
  color:#fff;
  margin-bottom:10px;
  display:none;
}

/* LARGE SCREENS */
@media(min-width:700px){
  .wrapper{
    display: grid;
    grid-template-columns: 1fr 2fr;
  }

  .wrapper > *{
    padding:2em;
  }
h{
color: pink;
}
  .company-info h3, .company-info ul, .brand{
    text-align: left;
  }
}
</style >
</head>
<body>
  <div class="container">
      <div class="wrapper">
      <div class="company-info">
        <h3>Macrame Art  Website</h3>
        <ul>
    <li><i class="fa fa-phone"></i>  
type the nunber</li>
      <li><i class="fa fa-envelope"></i>
type the user email for example;<br>
"createthewebsiteinhtmlcssjsbtinlowprice@gmail.
com"<br>message-the-email& informaton<br>
      to you website.busines-than create
you website </li>
        </ul>
      </div>
      <div class="contact">
        <h3>Contact us form </h3>
        <div class="alert">Your
message has been sent</div>
        <form id="contactForm">
          <p>
            <label>Name</label>
            <input type="text" name="name"
id="name" required>
          </p>
     
          <p>
            <label>Email Address</label>
            <input type="email" name="email"
id="email" required>
          </p>
          <p>
     <label>phone Number</label>
       <input type ="phone number" name
="phone number " id ="phone number " required>
      </p>
 
        <p class="full">
            <label>feedback</label>
            <textarea name="Feedback"
rows="5" id="Feedback"></textarea>
          </p>
       
       <p class="full">
        <button type="submit">Submit</button>
          </p>
        </form>
      </div>
    </div>
  </div>

  <script src="https://www.gstatic.com/
firebasejs/4.3.0/firebase.js"></script>
  <script src="main.js"></script>
<script>
// Initialize Firebase (ADD YOUR OWN DATA)

firebase.initializeApp(config);

// Reference messages collection
var messagesRef = firebase.database()
.ref('messages');

// Listen for form submit
document.getElementById('contactForm')
.addEventListener('submit', submitForm);

// Submit form
function submitForm(e){
  e.preventDefault();

  // Get values
  var name = getInputVal('name');
  var email = getInputVal('email');
 var phone number=getlnputVal('  phone number')
   var feedback = getInputVal('feedback');

  // Save message
  saveMessage(name,  email, phone number,
feedback);

  // Show alert
  document.querySelector('.alert').
style.display = 'block';

  // Hide alert after 3 seconds
  setTimeout(function(){
    document.querySelector('.alert').
style.display = 'none';
  },3000);

  // Clear form
  document.getElementById('contactForm').reset();
}

// Function to get get form values
function getInputVal(id){
  return document.getElementById(id).value;
}

// Save message to firebase
function saveMessage(name,  email,phone number,
feedback){
  var newMessageRef = messagesRef.push();
  newMessageRef.set({
    name: name,
   email:email,
   phone number: phone number,
   feedback: feedback,
  });
}
</script >
</body>
</html>

Related post 

type of css selectors

html form tag

php while loop