Javascript AJAX jQuery HTML PHP Example MORE

How to create a responsive table in HTML and CSS


<!DOCTYPE html>
    <title>Responsive table</title>
        table {
            font-family: arial, sans-serif;
            border-collapse: collapse;
            width: 100%;

        th {
            border: 1px solid #dddddd;
            text-align: left;
            padding: 8px;

        tr:nth-child(even) {
            background-color: #blue;

Run it yourself


Responsive table
1 Sachin Mumbai
2 Dhoni Ranchi
3 Kohili Delhi
4 Yuvraj Punjab
5 Raina Chennai
6 Rohit Mumbai