Login Form IN HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<form>
<div>
<lable = "UserName">user Name</lable> <!--------Lable is before any box ---->
<input type="text" id="UserName" >
</div>
<div>
<lable = "passwordFor">Password</lable>
<input type = "password" id = "passwordFor" required placeholder = "Enter your password">
</div>
<div><input type = "submit"></div> <!-----------This is submit button----------->
</form>
</body>
</html>
Explanation:
>> for create a form we should use first form tag then will take input from user to validate data in backend thats the reason in form will take input from user by entering this tag = input = "inputType[example- text"]
In this code lable will gives u name for the box like here u can see on image user name, Password before the box is a lable
Placeholder = if you want to add something for hint in box then u need to use placeholder tag
Why we are using div ?
Ans: because input is a inline tag and it will gives u form in single line without any break thats the reason I'm using div for all input element because div is a bock element.
this is lable , User name[is a lable] |
Comments
Post a Comment