How to create Sign Up form in HTML using HTML and CSS
For creating Sign Up form I use VS Code Editor to edit the codes.
Download link for VS Code: Click Here to download
I have used the external CSS Method so the files can be differentiate here.
First open editor and create new file for writing:
Now the CSS file that is linked to the HTML file is below here: The file name is "style.css". You can change name of it but also change it in the html file.
Watch youtube video of the above HTML code: Click Here to Watch .
Download link for VS Code: Click Here to download
I have used the external CSS Method so the files can be differentiate here.
First open editor and create new file for writing:
<!DOCTYPE html>
<html>
<html>
<head>
<title>Sign Up Form</title>
<link rel="stylesheet" href="style.css">
</head>
<body background="https://cdn.pixabay.com/photo/2018/08/14/13/23/ocean-3605547_960_720.jpg" text="white">
<form action="" method="">
<div class="Container">
<div class="login-box">
<div class="centered">
<label id="L1" for="uname">Username</label>
<br>
<input type="username" name="uname" maxlength=25 placeholder="Enter Username" required>
<br><br>
<label id="L2" for="pass">Password</label>
<br>
<input type="password" name="pass" maxlength=15 placeholder="Enter Password" required>
<br><br>
<label id="L3" for="mobile">Mobile No.</label>
<br>
<input type="number" name="mobile" maxlength=11 placeholder="Enter Mobile No." required>
<br><br>
<button type="submit" value="submit" id="B1">Submit..</button>
<br><br>
<span class="acc">Already have an account? <a href="#">Sign In</a></span>
</div>
</div>
</div>
</form>
</body>
</html>
Now the CSS file that is linked to the HTML file is below here: The file name is "style.css". You can change name of it but also change it in the html file.
#L1{font-size:20px}
#L2{font-size:20px}
#L3{font-size:20px}
#B1{height:40px; width: 90px; position:relative; left:15%}
.login-box
{
width:250px;
height:320px;
background: rgba(0, 0, 0, 0.322);
color:#fff;
top:45%;
left:50%;
position:absolute;
transform:translate(-50%, -50%);
box-sizing: border-box;
}
.centered
{
position:relative;
top:45%;
left:60%;
transform: translate(-50%, -50%);
}
.acc
{
font-size: 15px;
}
#
is used to define the element using ID and the .class name
is used to define element using their class.Watch youtube video of the above HTML code: Click Here to Watch .
Comments
Post a Comment