blob: 041a837b4a4ffba1c9bad2d20d89da117684e05b [file] [log] [blame]
benjamin@webkit.orgd6a99c42014-12-23 00:38:52 +00001<!doctype html>
2<html>
3<head>
4 <style>
5 form {
6 padding: 5px;
7 margin: 2px;
8 border: 1px solid black;
9 }
10 </style>
11</head>
12<body>
13 <p>Test the basics of the pseudo class :valid with the &lt;form&gt; element.</p>
14
15 <!-- Empty form -->
16 <form style="background-color: green"></form>
17
18 <!-- Basic input as a descendant. -->
19 <form style="background-color: green">
20 <input>
21 </form>
22
23 <!-- Basic input associated. -->
24 <div>
25 <form id="basic_input" style="background-color: green"></form>
26 <input form="basic_input">
27 </div>
28
29 <!-- Required input as a descendant. -->
30 <form style="background-color: red">
31 <input required>
32 </form>
33
34 <!-- Required input associated. -->
35 <div>
36 <form id="required_input" style="background-color: red"></form>
37 <input form="required_input" required>
38 </div>
39
40 <!-- Valid required input as a descendant. -->
41 <form style="background-color: green">
42 <input value="WebKit!" required>
43 </form>
44
45 <!-- Valid required input associated. -->
46 <div>
47 <form id="valid_required_input" style="background-color: green"></form>
48 <input value="WebKit!" form="valid_required_input" required>
49 </div>
50
51</body>
52</html>