This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Task3.html
72 lines (71 loc) · 2 KB
/
Task3.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
<!-- Write HTML to generate the following output. -->
<!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>Table</title>
<style>
table{
font-size: 32px ;
border-collapse: collapse;
text-align: center;
}
.center {
border: 3px solid blue;
border-radius: 15px;
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
padding: 10px;
}
tr,td{
border: 3px solid;
column-width: 250px;
min-width: 75px;
height: 50px;
border-collapse: collapse;
}
tr td:first-child{background-color: orange;}
tr td:last-child {background-color: green;}
tr:first-child td:nth-child(2),tr:first-child td:nth-child(3), tr:last-child td:nth-child(2), tr:last-child td:nth-child(3) {background-color: skyblue;}
tr:nth-child(2) td:nth-child(2){background-color: pink;}
tr:nth-child(3) td:nth-child(2),tr:nth-child(3) td:nth-child(3){background-color: yellow;}
</style>
</head>
<body>
<div>
<table class="center">
<tr>
<td>10</td>
<td>20</td>
<td>30</td>
<td>4</td>
</tr>
<tr>
<td>50</td>
<td colspan="2">Colour Table</td>
<td>6</td>
</tr>
<tr>
<td>70</td>
<td rowspan="2">80</td>
<td rowspan="2">90</td>
<td>10</td>
</tr>
<tr>
<td>110</td>
<td>12</td>
</tr>
<tr>
<td>130</td>
<td>140</td>
<td>150</td>
<td>16</td>
</tr>
</table>
</div>
</body>
</html>