-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHTML-table.html
162 lines (157 loc) · 4.03 KB
/
HTML-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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HTML Table</title>
<style>
.t2,
.t2 th,
.t2 td {
font-size: small;
border: 1px solid black;
border-collapse: collapse; /*Borders are collapsed into a single border when possible*/
padding: 0.2rem;
}
td[scope] {
padding: 5px;
color: tomato;
}
.t3,
.t3 th,
.t3 td {
font-size: small;
border: 1px solid black;
border-collapse: collapse; /*Borders are collapsed into a single border when possible*/
padding: 0.2rem;
}
.t3 tr:nth-child(odd) {
color: whitesmoke;
background-color: rgb(49, 143, 206);
}
td.nb{
border: none;
white-space: normal;
}
</style>
</head>
<body>
<table>
<tr>
<th scope="col">Item</th>
<th scope="col">Availability</th>
<th scope="col">Qty</th>
<th scope="col">Price</th>
</tr>
<tr>
<td>Don’t Make Me Think by Steve Krug</td>
<td>In Stock</td>
<td>1</td>
<td>$30.02</td>
</tr>
<tr>
<td>Don’t Make Me Think by Steve Krug</td>
<td>In Stock</td>
<td>1</td>
<td>$30.02</td>
</tr>
<tr>
<td>
A Project Guide to UX Design by Russ Unger & Carolyn Chandler
</td>
<td>In Stock</td>
<td>2</td>
<td>$52.94 ($26.47 × 2)</td>
</tr>
<tr>
<td>Introducing HTML5 by Bruce Lawson & Remy Sharp</td>
<td>Out of Stock</td>
<td>1</td>
<td>$22.23</td>
</tr>
<tr>
<td>Bulletproof Web Design by Dan Cederholm</td>
<td>In Stock</td>
<td>1</td>
<td>$30.17</td>
</tr>
</table>
<hr />
<table class="t2" summary="details of company employees">
<!-- summary attribute provides a more detailed description of the table -->
<caption>
Table 1: Company data
</caption>
<!-- The <caption> element can be used to provide a short description of a table -->
<tr>
<th scope="row">Company</th>
<th>Employees</th>
<th abbr="Founded">Founded</th>
<!-- the abbr attribute to provide an abbreviated version of any long headers -->
</tr>
<tr>
<td scope="row">ACME Inc</td>
<td>1000</td>
<td>1947</td>
</tr>
<tr>
<td scope="row">XYZ Corp</td>
<td>2000</td>
<td>1973</td>
</tr>
</table>
<br />
<table class="t3">
<caption>
Demo Table
</caption>
<tr class="t3tr">
<th scope="row">Names</th>
<th scope="row">Age</th>
<th scope="row">City</th>
<th scope="row" colspan="2">Phone <br> Numbers</th>
<th scope="row" colspan="3">Hobbies</th>
</tr>
<tr>
<td>Rakib</td>
<td>23</td>
<td>Habiganj</td>
<td>01829661796</td>
<td>025664000</td>
<td class="nb">Gaming,</td>
<td class="nb">Reading &</td>
<td class="nb">Seeking knowledge</td>
</tr>
<tr>
<td>Shuvo</td>
<td>24</td>
<td>Comilla</td>
<td>01723545456</td>
<td>0265463500</td>
<td class="nb">Gaming,</td>
<td class="nb">Touring &</td>
<td class="nb">Shopping</td>
</tr>
<tr>
<td>Ohi</td>
<td>23</td>
<td>Habiganj</td>
<td>0133189552</td>
<td>0256634960</td>
<td class="nb">Tutorials,</td>
<td class="nb">Touring &</td>
<td class="nb">Dancing</td>
</tr>
<tr>
<td>Zakir</td>
<td>26</td>
<td>Pabna</td>
<td>0662594516</td>
<td>09996635</td>
<td class="nb">Singing,</td>
<td class="nb">Touring &</td>
<td class="nb">Shopping</td>
</tr>
</table>
</body>
</html>