Crypto Table Code (HTML, CSS, JavaScript) - Version
HTML Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Crypto Prices</title>
<link rel="stylesheet" href="[Link]">
</head>
<body>
<div class="container">
<h2>Search cryptocurrencies</h2>
<input type="text" id="search" placeholder="Search..." onkeyup="searchTable()">
<table id="cryptoTable">
<thead>
<tr>
<th>Logo</th>
<th>Name</th>
<th>Symbol</th>
<th>Price</th>
<th>Price Change</th>
<th>24h Volume</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="[Link] alt="LINK" class="logo"></
<td>Chainlink</td>
<td>LINK</td>
<td>$13.501005688196122</td>
<td class="red">-3.90%</td>
<td>-</td>
</tr>
<tr>
<td><img src="[Link] alt="USDS" class="logo"></t
<td>USDS</td>
<td>USDS</td>
<td>$1.0093451093622365</td>
<td class="green">1.65%</td>
<td>-</td>
</tr>
<tr>
<td><img src="[Link] alt="PI" class="logo"></td>
<td>Pi Network Coin</td>
<td>PI</td>
<td>$1.395409123117374</td>
<td class="red">-4.26%</td>
<td>-</td>
</tr>
<tr>
<td><img src="[Link] alt="TON" class="logo"></td>
<td>Toncoin</td>
<td>TON</td>
<td>$3.408056856327604</td>
<td class="green">1.25%</td>
<td>-</td>
</tr>
<tr>
<td><img src="[Link] alt="XLM" class="logo"></td>
<td>Stellar</td>
<td>XLM</td>
<td>$0.2646798671387796</td>
<td class="red">-4.00%</td>
<td>-</td>
</tr>
<tr>
<td><img src="[Link] alt="HBAR" class="logo"></td>
<td>Hedera</td>
<td>HBAR</td>
<td>$0.1865852534916954</td>
<td class="red">-3.28%</td>
<td>-</td>
</tr>
<tr>
<td><img src="[Link] alt="SHIB" class="logo"></
<td>Shiba Inu</td>
<td>SHIB</td>
<td>$0.000013024972380965</td>
<td class="green">1.82%</td>
<td>-</td>
</tr>
</tbody>
</table>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS Code:
body {
font-family: Arial, sans-serif;
background: #f5f5f5;
padding: 20px;
}
.container {
width: 90%;
margin: auto;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
h2 {
margin-bottom: 10px;
color: #333;
}
#search {
width: 100%;
padding: 8px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 5px;
}
table {
width: 100%;
border-collapse: collapse;
}
table thead {
background: #333;
color: white;
}
table th, table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
}
table tr:hover {
background: #f9f9f9;
}
.logo {
width: 25px;
height: 25px;
}
.red {
color: red;
}
.green {
color: green;
}
JavaScript Code:
function searchTable() {
let input = [Link]("search").[Link]();
let rows = [Link]("#cryptoTable tbody tr");
[Link](row => {
let text = [Link]();
[Link] = [Link](input) ? "" : "none";
});
}