Elegant Dark Table - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Elegant Dark Table</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> <style> body { font-family: 'Arial', sans-serif; background: #2c3e50; color: #ecf0f1; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } table { width: 80%; border-collapse: collapse; background: #34495e; border-radius: 10px; overflow: hidden; animation: slideIn 1s ease-in-out; } th, td { padding: 15px; text-align: left; } th { background: #1abc9c; color: #fff; font-size: 1.1em; font-weight: bold; } td { background: #34495e; color: #bdc3c7; border-bottom: 1px solid #1abc9c; transition: background 0.3s ease; } td:hover { background: #16a085; } tr:nth-child(even) td { background: #2c3e50; } tr:hover td { background: #1abc9c; color: #fff; } .icon { margin-right: 10px; } @keyframes slideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .emoji { display: inline-block; font-size: 1.5em; margin-right: 5px; } </style> </head> <body> <table> <thead> <tr> <th><i class="fas fa-user icon"></i> Name</th> <th><i class="fas fa-envelope icon"></i> Email</th> <th><i class="fas fa-birthday-cake icon"></i> Birthday</th> <th><i class="fas fa-map-marker-alt icon"></i> Location</th> <th><i class="fas fa-star icon"></i> Rating</th> </tr> </thead> <tbody> <tr> <td><span class="emoji">👤</span> John Doe</td> <td><span class="emoji">📧</span> john.doe@example.com</td> <td><span class="emoji">🎂</span> January 1, 1990</td> <td><span class="emoji">📍</span> New York, USA</td> <td><span class="emoji">⭐</span> 5</td> </tr> <tr> <td><span class="emoji">👤</span> Jane Smith</td> <td><span class="emoji">📧</span> jane.smith@example.com</td> <td><span class="emoji">🎂</span> February 20, 1985</td> <td><span class="emoji">📍</span> London, UK</td> <td><span class="emoji">⭐</span> 4</td> </tr> <tr> <td><span class="emoji">👤</span> Mike Johnson</td> <td><span class="emoji">📧</span> mike.johnson@example.com</td> <td><span class="emoji">🎂</span> March 15, 1975</td> <td><span class="emoji">📍</span> Sydney, Australia</td> <td><span class="emoji">⭐</span> 3</td> </tr> </tbody> </table> <script> document.querySelectorAll('tbody tr').forEach(row => { row.addEventListener('click', () => { row.classList.toggle('highlight'); }); }); </script> </body> </html>