Beautiful HTML Table Design – Coding Torque

Share your love

Hello Guys! Welcome to Coding Torque. In this blog, we are going to make a beautiful HTML table design using HTML and CSS. You must create this if you are a beginner and learning HTML and CSS.

Before we start, here are some JavaScript Games you might like to create:

1. Snake Game using JavaScript

2. 2D Bouncing Ball Game using JavaScript

3. Rock Paper Scissor Game using JavaScript

4. Tic Tac Toe Game using JavaScript

5. Whack a Mole Game using JavaScript

I would recommend you don’t just copy and paste the code, just look at the code and type by understanding it.


HTML Code 

Starter Template

<!doctype html>
  <html lang="en">
      <!-- Required meta tags -->
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <title>Beautiful HTML Table Design - @codingtorque</title>
      <link rel="stylesheet" href="style.css">
      <link href="" rel="stylesheet">
          <!-- further code in next block -->


Paste the below code in your <body> tag

<table class="styled-table">
            <th>Sr no</th>
        <tr class="active-row">
            <td>Swift Desire</td>
        <tr class="active-row">


Output Till Now

CSS Code 

Create a file style.css and paste the code below.

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 10rem;

.styled-table {
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    font-family: sans-serif;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);

.styled-table thead tr {
    background-color: #009879;
    color: #ffffff;
    text-align: left;

.styled-table th,
.styled-table td {
    padding: 12px 15px;

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid #009879;

.styled-table tbody {
    font-weight: bold;
    color: #009879;

Output Till Now

beautiful html table with source code
Written by: Piyush Patil
Code Credits: @dcode
If you have any doubts or any project ideas feel free to Contact Us
Hope you find this post helpful💖
Share your love