-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
85 lines (72 loc) · 1.6 KB
/
index.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Belajar Cookie</title>
<style>
* {
box-sizing: border-box;
}
body {
font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
}
form {
max-width: 500px;
margin: 2em auto;
padding: 2em;
border: 1px solid #ddd;
transition: all .3s ease;
}
label,
input,
textarea {
display: block;
width: 100%;
}
input,
textarea {
min-height: 43px;
margin-bottom : 2em;
padding-left: 13px;
padding-right: 13px;
border: 1px solid #bbb;
}
textarea {
min-height: 8em;
}
input[type="submit"] {
margin: 0;
background: #333;
color: #fff;
border: 1px solid #333;
font-size: 18px;
text-transform: uppercase;
}
.center {
text-align: center;
}
.hidden {
position: absolute;
transform: scale(0);
transform-origin: 50% 50%;
clip: rect(0, 0, 0, 0)
}
</style>
</head>
<body>
<h2 class="center">Persisting form data into localStorage</h2>
<form action="">
<label for="name">Name</label>
<input type="text" name="" id="name">
<label for="email">Email Address</label>
<input type="email" name="" id="email">
<label for="notes">Notes</label>
<textarea name="" id="notes"></textarea>
<input type="submit" value="Login">
</form>
<script src="script.js"></script>
</body>
</html>