<!DOCTYPE html>
<
html
>
<
head
>
<
title
>Table In HTML</
title
>
<
style
media
=
"screen"
>
table {
margin: 0 auto;
border-collapse: collapse;
}
table td {
padding: 0.5rem;
border: 5px solid DodgerBlue;
}
table th {
padding: 0.5rem;
border: 5px solid Tomato;
}
/* Removing all unwanted border
from left hand side by calling
all the elements in the first
column and removing their left
border*/
table tr td:first-child, th:first-child{
border-left: none;
}
/* Removing all unwanted border
from top of the table by calling
all the elements in first row and
removing their top border*/
table tr:first-child th{
border-top: none;
}
/* Removing all unwanted border
from right hand side by calling
all the elements in last row and
removing their right border*/
table tr td:last-child, th:last-child{
border-right: none;
}
/* Removing all unwanted border
from bottom of the table by
calling all the elements in
last column and removing their
bottom border*/
table tr:last-child td{
border-bottom: none;
}
</
style
>
</
head
>
<
body
>
<
table
>
<
tr
>
<
th
>Roll Number</
th
>
<
th
>Name Of Geek</
th
>
<
th
>Marks</
th
>
</
tr
>
<
tr
>
<
td
>01</
td
>
<
td
>Geek 01</
td
>
<
td
>100</
td
>
</
tr
>
<
tr
>
<
td
>02</
td
>
<
td
>Geek 02</
td
>
<
td
>95</
td
>
</
tr
>
<
tr
>
<
td
>03</
td
>
<
td
>Geek 03</
td
>
<
td
>90</
td
>
</
tr
>
</
table
>
</
body
>
</
html
>