forked from mr-robot-2008/html
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtable.html
More file actions
72 lines (63 loc) · 1.78 KB
/
table.html
File metadata and controls
72 lines (63 loc) · 1.78 KB
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
<!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 in HTML</title>
<!--STYLING THE TABLE-->
<style>
body {
margin-top:200px;
background-color: #ecc8af;
}
table, th, td {
border: 1px solid black;
margin: auto;
width: 800px;
height:40px;
font-size: 25px;
background-color: #e7ad99;
}
h1 {
text-align:center;
}
</style>
</head>
<body>
<!--TABLE IN HTML-->
<h1>TABLE IN HTML</h1>
<!--TO CREATE A TABLE IN HTML YOU HAVE TO FOLLOW THE SYNTAX BELOW-->
<!--<table> TAG TO START CREATING A TABLE-->
<table>
<!--<tr> TAG STAND FOR "TABLE ROW ELEMENT". HERE WE ARE CREATING A ROW USING THIS TAG-->
<!--ROW 1 CONTAINING HEADERS-->
<tr>
<!--<th> TAG REFERS TO "TABLE HEADER ELEMENT"-->
<th>Serial No.</th>
<th>Name</th>
<th>Points Scored</th>
</tr>
<!--ROW 2-->
<tr>
<!--<td> TAG REFERS TO TABLE DATA ELEMENT, THAT IS THE DATA YOU WILL BE ADDING IN THE TABLE-->
<td>1.</td>
<td>Erick Haynes</td>
<td>78</td>
</tr>
<!--ROW 3-->
<tr>
<td>2.</td>
<td>Leroy Williamson</td>
<td>91</td>
</tr>
<!--ROW 4-->
<tr>
<td>3.</td>
<td>Keith Garner</td>
<td>84</td>
</tr>
</table>
<!--END OF TABLE-->
</body>
</html>