html
html
1
2
3
4
5
6
7
8
9
10
11
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div>
<ul id="squares" ></ul>
</div>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
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
body {
display:flex;
align-content:center;
font-size: 16px;
text-align: center;
color: #ffffff;
background-color:#05445e;
}
div{
margin:auto;
}
sup{
font-size:10px;
}
#squares{
width: 40%;
width:50vw;
padding:5px;
list-style-type: none;
outline: 1px solid #ffffff;
}
#squares li{
padding-top:2px;
padding-bottom:2px;
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
window.onload = () => {
let list = document.getElementById("squares")
for(i=1;i<=20; i++){
list.innerHTML +=`<li>${i}<sup>2</sup> = ${i*i}</li>`
}
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run