Gmail sign up form using

Here is an example of a Gmail sign-up form using HTML, CSS, and JavaScript:

HTML:

<form id="gmail-signup-form">
  <label for="username">Username:</label>
  <input type="text" id="username" name="username" required><br><br>
  <label for="password">Password:</label>
  <input type="password" id="password" name="password" required><br><br>
  <label for="confirm-password">Confirm Password:</label>
  <input type="password" id="confirm-password" name="confirm-password" required><br><br>
  <label for="email">Email:</label>
  <input type="email" id="email" name="email" required><br><br>
  <input type="submit" value="Sign up">
</form>

CSS:

#gmail-signup-form {
  width: 300px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#gmail-signup-form label {
  display: block;
  margin-bottom: 10px;
}

#gmail-signup-form input[type="text"], #gmail-signup-form input[type="password"] {
  width: 100%;
  height: 40px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#gmail-signup-form input[type="submit"] {
  width: 100%;
  height: 40px;
  background-color: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#gmail-signup-form input[type="submit"]:hover {
  background-color: #3e8e41;
}

JavaScript:

const form = document.getElementById('gmail-signup-form');
const usernameInput = document.getElementById('username');
const passwordInput = document.getElementById('password');
const confirmPasswordInput = document.getElementById('confirm-password');
const emailInput = document.getElementById('email');

form.addEventListener('submit', (e) => {
  e.preventDefault();
  const username = usernameInput.value;
  const password = passwordInput.value;
  const confirmPassword = confirmPasswordInput.value;
  const email = emailInput.value;

  if (password!== confirmPassword) {
    alert('Passwords do not match');
    return;
  }

  // Send the form data to the server using AJAX or fetch API
  // For demonstration purposes, we'll just log the data to the console
  console.log({ username, password, email });
});

This code creates a simple sign-up form with fields for username, password, confirm password, and email. When the form is submitted, it checks if the passwords match and then logs the form data to the console. You'll need to modify the JavaScript code to send the form data to your server using AJAX or the Fetch API.

Note that this is just a basic example and you should consider implementing additional security measures, such as validating user input and storing passwords securely.