-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforms.html
47 lines (35 loc) · 1.17 KB
/
forms.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form Demo</title>
</head>
<body>
<h1>Login</h1>
<!-- action - where the form sends data to -->
<!-- method - what HTTP method (get/post) -->
<!-- GET by default if not efined -->
<form > <!-- action="http://wikipedia.org" method="GET" -->
<!--
<label>
Username:
<input name="username" type="text" placeholder="username">
</label>
<label>
Password:
<input name="password" type="password" placeholder="password">
</label>
<input type="Submit"> -->
<!-- type is the type of input field that is produced -->
<!-- placeholder puts temporary text into the inputs -->
<!-- name is the key, what is entered is the value and is what is sent as a query string -->
<label for="user">Emal:</label>
<input id="user" name="username" type="email" placeholder="email" required>
<label for="pw">Password:</label>
<input id="pw" name="password" type="password" placeholder="password" required>
<!-- required is prescence validation, it checks something is actually there -->
<input type="Submit">
</form>
<!-- form is a block level element, input is inline -->
</body>
</html>