---
title: "How to design a table using CSS?"  
description: "How to design a table using CSS?"  
author: "Ravi Vishwakarma"  
published: 2021-07-19  
canonical: https://answers.mindstick.com/qa/93776/how-to-design-a-table-using-css  
category: "web application"  
tags: ["javascript", "css cascading style sheets", "html5"]  
reading_time: 3 minutes  

---

# How to design a table using CSS?

How to [design](https://www.mindstick.com/articles/126148/the-way-to-merge-psd-style-and-design-in-to-reactive-html) a [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) using [CSS](https://www.mindstick.com/articles/12349/a-step-by-step-guide-to-making-pure-css-tooltips)?

## Answers

### Answer by Ethan Karla

```
<!DOCTYPE html>
<html lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
    <meta charset='utf-8' />
    <title></title>
    <style>
        #customers {
            font-family: Arial, Helvetica, sans-serif;
            border-collapse: collapse;
            width: 100%;
        }
            #customers td, #customers th {
                border: 1px solid orange;
                padding: 8px;
            }
            #customers tr:nth-child(even) {
                background-color: #f2f2f2;
            }
            #customers tr:hover {
                background-color: orange;
                color:white;
            }
            #customers th {
                padding-top: 12px;
                padding-bottom: 12px;
                text-align: left;
                background-color: orange;
                color: white;
            }
    </style>
</head>
<body>
    <table id='customers'>
        <tr>
            <th>Company</th>
            <th>Contact</th>
            <th>Country</th>
        </tr>
        <tr>
            <td>MindStick Pvt Ltd</td>
            <td>www.mindstick.com</td>
            <td>India</td>
        </tr>
         <tr>
            <td>MindStick Pvt Ltd</td>
            <td>www.mindstick.com</td>
            <td>India</td>
        </tr>
         <tr>
            <td>MindStick Pvt Ltd</td>
            <td>www.mindstick.com</td>
            <td>India</td>
        </tr>
         <tr>
            <td>MindStick Pvt Ltd</td>
            <td>www.mindstick.com</td>
            <td>India</td>
        </tr>
         <tr>
            <td>MindStick Pvt Ltd</td>
            <td>www.mindstick.com</td>
            <td>India</td>
        </tr>
         <tr>
            <td>MindStick Pvt Ltd</td>
            <td>www.mindstick.com</td>
            <td>India</td>
        </tr>
         <tr>
            <td>MindStick Pvt Ltd</td>
            <td>www.mindstick.com</td>
            <td>India</td>
        </tr>
         <tr>
            <td>MindStick Pvt Ltd</td>
            <td>www.mindstick.com</td>
            <td>India</td>
        </tr>
    </table>
</body>
</html>
```

\


---

Original Source: https://answers.mindstick.com/qa/93776/how-to-design-a-table-using-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
