-
Notifications
You must be signed in to change notification settings - Fork 0
/
13-forms.html
113 lines (100 loc) · 2.91 KB
/
13-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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forms</title>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
}
form {
display: flex;
flex-direction: column;
gap: 10px;
background-color: lightblue;
padding: 15px;
border-radius: 6px;
width: 60%;
margin: 10px auto;
box-shadow: 4px 4px 10px gray;
}
.stretch-last {
display: flex;
align-items: center;
gap: 6px;
}
.stretch-last :last-child {
flex-grow: 1;
}
/* input styling */
input.styled {
background-color: lightcyan;
color: black;
padding: 10px;
border: none;
outline: none;
transition: .1s;
}
input.styled:focus {
box-shadow: inset 1px 1px 4px gray;
}
button.styled {
background-color: darkblue;
color: white;
border: none;
padding: 10px;
text-transform: uppercase;
}
</style>
</head>
<body>
<form>
<h2>Pizza Order Form</h2>
<div class="stretch-last">
<label>Name:</label>
<input type="text" placeholder="Enter your name">
</div>
<div class="stretch-last">
<label>Email Address:</label>
<input type="email" placeholder="Enter address">
</div>
<label>Price:</label>
<input type="number" min="50" max="1000" step="25">
<label accesskey="k">
<span>Check me</span>
<input type="checkbox" name="" id="">
</label>
<input type="color" name="" id="">
<input type="date" name="" id="">
<input type="time" name="" id="">
<input type="file" name="" id="">
<input type="password" name="" id="">
<div>
<label>
<span>Ecomon</span>
<input type="radio" name="orderType" id="">
</label>
<label>
<span>Standart</span>
<input type="radio" name="orderType" id="">
</label>
<label>
<span>Premium</span>
<input type="radio" name="orderType" id="">
</label>
</div>
<input type="range" name="" id="">
<input class="styled" type="url" name="" id="">
<button type="reset">Reset</button>
<button class="styled" type="submit">Submit</button>
</form>
<script>
const submitBtn = document.querySelector('button[type=submit]');
submitBtn.onclick = (event) => {
event.preventDefault();
alert("Clicked");
}
</script>
</body>
</html>