forked from 4iz268/cviceni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
10-form-nove-prvky-html5.html
141 lines (137 loc) · 4.51 KB
/
10-form-nove-prvky-html5.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Nové formulářové prvky v HTML 5</title>
<style type="text/css">/*styly pro přehlednější zobrazení*/
/* <![CDATA[ */
table.listTable td{
padding: 5px 10px;
}
table.listTable tr:nth-child(odd){
background: rgb(228, 238, 240);
}
/* ]]>*/
</style>
</head>
<body>
<h1>Formuláře - novinky v HTML 5</h1>
<p>Schválně si zkuste tuto stránku zobrazit v různých prohlížečích...</p>
<form>
<table class="listTable">
<tr>
<td>
<label for="number">Input type="number", s krokováním po 10</label>
</td>
<td>
<!--atributy id a name mohou mít rozdílné hodnoty! Vazba s labelem se realizuje pomocí id, na serveru jsou data identifikována pomocí name.-->
<input type="number" id="number" name="points" min="0" max="100" step="10" value="30" />
</td>
</tr>
<tr>
<td>
<label for="date">Input type="date"</label>
</td>
<td>
<input type="date" id="date" name="date"/>
</td>
</tr>
<tr>
<td>
<label for="datetime">Input type="datetime-local"</label>
</td>
<td>
<input type="datetime-local" id="datetime" name="datetime"/>
</td>
</tr>
<tr>
<td>
<label for="color">Input type="color"</label>
</td>
<td>
<input type="color" id="color" name="color" value="#ff0000"/>
</td>
</tr>
<tr>
<td>
<label for="range">Input type="range"</label>
</td>
<td>
<input type="range" id="range" name="range" min="0" max="100" value="20"/><!--pokud neuvedete hodnotu, je zvolena v prostředku intervalu-->
</td>
</tr>
<tr>
<td>
<label for="month">Input type="month"</label>
</td>
<td>
<input type="month" id="month" name="month"/>
</td>
</tr>
<tr>
<td>
<label for="week">Input type="week"</label>
</td>
<td>
<input type="week" id="week" name="week"/>
</td>
</tr>
<tr>
<td>
<label for="time">Input type="time"</label>
</td>
<td>
<input type="time" id="time" name="time"/>
</td>
</tr>
<tr>
<td>
<label for="email">Input type="email"</label>
</td>
<td>
<input type="email" id="email" name="email"/>
</td>
</tr>
<tr>
<td>
<label for="url">Input type="url"</label>
</td>
<td>
<input type="url" id="url" name="url"/>
</td>
</tr>
<tr>
<td>
<label for="tel">Input type="tel"</label>
</td>
<td>
<input type="tel" id="tel" name="tel"/>
</td>
</tr>
<tr>
<td>
<label for="search">Input type="search"</label>
</td>
<td>
<input type="search" id="search" name="search"/>
</td>
</tr>
<tr>
<td>
<label for="browsers">Datalist</label>
</td>
<td>
<input list="browsersList" id="browsers" name="browsers">
<datalist id="browsersList">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
</td>
</tr>
</table>
</form>
</body>
</html>