<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Static Template</title>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"
></script>
<script type="text/javascript">
$(document).ready(function () {
fetch("https://api.coinpaprika.com/v1/coins")
.then((response) => response.json())
.then((coins) => {
var str = "";
for (let i = 0; i < 20; ++i) {
const coin = coins[i];
str += `<tr><td>${coin.name}</td><td>${coin.symbol}</td></tr>`;
}
$("#list").html(str);
});
});
</script>
</head>
<body>
<h1>Coinpaprika Top 20 Coins</h1>
<div>
<table>
<thead>
<tr>
<th>Name</th>
<th>Ticker</th>
</tr>
</thead>
<tbody id="list" />
</table>
</div>
</body>
</html>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.