-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathAssignment_1.html
More file actions
33 lines (33 loc) · 1.01 KB
/
Assignment_1.html
File metadata and controls
33 lines (33 loc) · 1.01 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
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<script>
function generateTable() {
let table = document.getElementById("multiplicationTable");
for (let i = 1; i <= 10; i++) {
let row = table.insertRow();
for (let j = 1; j <= 10; j++) {
let cell = row.insertCell();
cell.innerHTML = `${i} * ${j} = ${i * j}`;
}
}
}
window.onload = generateTable;
</script>
</head>
<body>
<div class="container mt-5">
<h2 class="text-center">Multiplication Table</h2>
<table id="multiplicationTable" class="table table-bordered">
<thead>
<tr>
<th>Multiplication</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</body>
</html>