HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/signup-page.css">
<script src="https://kit.fontawesome.com/20d81f7ef4.js" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="javascript/signup-page.js"></script>
<title>SignUp page</title>
</head>
<body>
<div class="container" id="container">
<div class="left">
<div id="left-div">
<form action="">
<h1>Sign In</h1>
<div class="icon">
<a href="#"><i class="fab fa-instagram"></i></a>
<a href="#"><i class="fab fa-google"></i></a>
<a href="#"><i class="fab fa-linkedin"></i></a>
</div>
<div class="p">or use your account</div>
<div class="email">
<input type="email" name="" id="txtEmail" placeholder="Email" required>
</div>
<div class="pswd">
<input type="password" name="" class="pswd" id="pswd" placeholder="Password" required>
<a href="">
<i class="fa fa-eye" aria-hidden="true"></i>
</a>
</div>
<div class="forgot">
<a href="#">Forgot your password?</a>
</div>
<div class="btn">
<button id="Signin">SIGN IN</button>
</div>
</form>
</div>
<div id="left-hide">
<form action="">
<h1>Create Account</h1>
<div class="icon">
<a href="#"><i class="fab fa-instagram"></i></a>
<a href="#"><i class="fab fa-google"></i></a>
<a href="#"><i class="fab fa-linkedin"></i></a>
</div>
<div class="p">or use your email for registration</div>
<div class="name">
<input type="text" name="" id="txtName" placeholder="Name" required>
</div>
<div class="email">
<input type="email" name="" id="txtEmail1" placeholder="Email" required>
</div>
<div class="pswd">
<input type="password" name="" class="pswd" id="pswd1" placeholder="Password" required>
<a href="">
<i class="fa fa-eye" aria-hidden="true"></i>
</a>
</div>
<div class="btn">
<button id="Signin">SIGN UP</button>
</div>
</form>
</div>
</div>
<!-- Right part -->
<div class="right">
<div class="right1 " id="right-div">
<h1>Hello, Friend!</h1>
<p>Enter your personal details and start journey with us.</p>
<button id="signUp">SIGN UP</button>
</div>
<div class="right2" id="right-hide">
<h1>Welcome Back!</h1>
<p>To keep connected with us please login with your personal info</p>
<button id="signIn">SIGN IN</button>
</div>
</div>
</div>
</body>
</html>
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');
/* .valid{
border: 1px solid green;
}
.not-valid{
border: 1px solid green;
} */
* {
margin: 0px;
padding: 0px;
}
body {
font-family: 'Montserrat', sans-serif;
}
.container {
/* border: 2px solid black; */
height: 500px;
width: 750px;
border-radius: 15px;
margin: 0 auto;
box-shadow: 2px 2px 6px 1px rgb(215, 195, 170);
/* box-shadow: 0 14px 28px rgba(0,0,0,0.25),
0 10px 10px rgba(0,0,0,0.22); */
margin-top: 10px;
display: flex;
}
.container .left {
/* background-color: whitesmoke; */
height: inherit;
width: 50%;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.container .left h1 {
margin-bottom: 20px;
}
.container .left .icon {
margin-bottom: 20px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-evenly;
}
.container .left .icon i {
/* color: linear-gradient(45deg, #EA738DFF, #89ABE3FF); */
border: 2px solid #ddd;
border-radius: 50%;
padding: 10px;
color: black;
}
.container .left .p {
font-size: 13px;
}
.container .email input,
.pswd input,
.name input {
background-color: #eee;
border: none;
padding: 12px 15px;
margin: 8px 0px 0px 8px;
width: 250px;
}
.container .left .forgot {
margin-top: 20px;
font-size: 15px;
}
.container .left .forgot a {
text-decoration: none;
color: black;
}
.container .left .btn #Signin {
margin-top: 15px;
height: 40px;
width: 150px;
border: none;
color: white;
border-radius: 20px;
/* background-color: #89ABE3FF; */
background: linear-gradient(45deg, #EA738DFF, #89ABE3FF);
}
.container .right {
height: inherit;
border-radius: 0px 15px 15px 0px;
width: 50%;
background: linear-gradient(45deg, #EA738DFF, #89ABE3FF);
text-align: center;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
color: white;
}
.right h1 {
margin-bottom: 30px;
}
.right p {
margin: 0px 40px;
margin-bottom: 20px;
}
#signUp,
#signIn {
/* background-color: #fff; */
margin-top: 10px;
height: 40px;
width: 150px;
color: white;
border: 1px solid white;
border-radius: 20px;
background: transparent;
}
.pswd{
position: relative;
}
.pswd a i{
position: absolute;
top: 20px;
right: 15px;
color: black;
/* font-size: 14px; */
text-decoration: none;
letter-spacing: -1px;
}
.container #left-hide, #right-hide{
display: none;
}
/* button{
transition: transform 80ms ease-in;
} */
$(document).ready(function () {
$("#txtEmail").blur(function () {
var exp = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/;
var email = $("#txtEmail").val();
if (exp.test(email) == true) {
$(this).css("border", "2px solid green");
} else {
$(this).css("border", "2px solid red");
}
});
$("#txtEmail1").blur(function () {
var exp = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/;
var email = $("#txtEmail1").val();
if (exp.test(email) == true) {
$(this).css("border", "2px solid green");
} else {
$(this).css("border", "2px solid red");
}
});
$("#pswd").blur(function () {
var pass = $("#pswd").val();
var r = /(?=^.{8}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/;
if (r.test(pass) == true) {
$(this).css("border", "2px solid green");
} else {
$(this).css("border", "2px solid red");
}
});
$("#pswd1").blur(function () {
var pass = $("#pswd1").val();
var r = /(?=^.{8}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/;
if (r.test(pass) == true) {
$(this).css("border", "2px solid green");
} else {
$(this).css("border", "2px solid red");
}
});
$("#txtName").blur(function () {
var pass = $("#txtName").val();
var r=/^[a-zA-Z ]*$/;
if (r.test(pass) == false || pass.length=="") {
$(this).css("border", "2px solid red");
} else {
$(this).css("border", "2px solid green");
}
});
$(".fa").mouseenter(function () {
$("#pswd").prop("type", "text");
$(".fa").removeClass("fa-eye").addClass("fa-eye-slash");
});
$(".fa").mouseleave(function () {
$("#pswd").attr("type", "password");
$(".fa").removeClass("fa-eye-slash").addClass("fa-eye");
});
$(".fa").mouseenter(function () {
$("#pswd1").prop("type", "text");
$(".fa").removeClass("fa-eye").addClass("fa-eye-slash");
});
$(".fa").mouseleave(function () {
$("#pswd1").attr("type", "password");
$(".fa").removeClass("fa-eye-slash").addClass("fa-eye");
});
$("#signUp").click(function () {
// alert("hello");
$("#left-hide").fadeIn(1000);
$("#left-div").hide();
$("#right-div").hide();
$("#right-hide").slideDown();
});
$("#signIn").click(function () {
// alert("hello");
$("#left-div").fadeIn(1000);
$("#left-hide").hide();
$("#right-hide").hide();
$("#right-div").slideDown();
});
});
Also see: Tab Triggers