-
Notifications
You must be signed in to change notification settings - Fork 0
/
12.ders-table.html
85 lines (74 loc) · 2.15 KB
/
12.ders-table.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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ders 12: Table</title>
<style>
table{
border: 1px solid black;
/*içi boş olan kutuyu siler, sadece boş hücrelere etki eder*/
empty-cells: hide;
/* çizgiler arası mesafe*/
/* border-spacing: 10px; */
/* içindeki kutucuklardan arınmış ve tek çizgi halinde*/
border-collapse: collapse;
width: 50%;
height: 400px;
/* html kısmındaki caption'nın yerini belirliyor*/
caption-side: top;
}
th,td{
border:1px solid black;
padding: 10px;
text-align: center;
/* dikey hizalamayı ayarlıyoruz, middle-ortalıyor*/
vertical-align: middle;
}
tr:hover{
background-color: black;
color: white;
border:1px solid white;
}
tr:nth-child(odd){/*even-çift, odd-tek sırada olan satırların stilini değiştiriyor*/
background-color: rgb(30, 211, 181);
color: purple;
}
</style>
</head>
<body>
<table>
<caption>Müşteri listesi</caption>
<thead>
<tr>
<th>İsim</th>
<th>Meslek</th>
<th>Yaş</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sahil</td>
<td>Yazılım mühendisliği</td>
<td>21</td>
</tr>
<tr>
<td>Emirhan</td>
<td>Yazılım mühendisliği</td>
<td>20</td>
</tr>
<tr>
<td>Barış</td>
<td>Yazılım mühendisliği</td>
<td>21</td>
</tr>
<tr>
<td>Bilmem ne</td>
<td>Yazılım mühendisliği</td>
<td>21</td>
</tr>
</tbody>
</table>
</body>
</html>