Home Css Table How to Style Table Cell Border Using CSS
How to Style Table Cell Border Using CSS

Create file by using following code

<html>
<head>
</head>
<body>
<table border=”2”>
<tr>
<td>Some text</td>
<td>Some text</td>
</tr>
<tr>
<td>Some text</td>
<td>Some text</td>
</tr>
</table>

Above code will give you following result:

Table Border Using Css

To add blue thick border to your table use following code between <head> and </head>

<style>
table{border:blue solid;border-width:3 2 2 3}
td{border:blue solid;border-width:0 1 1 0}
</style>

Above code will give you following effect:

Table Border Using Css

If you want dashed border for table use following code:

table{border:black dashed;border-width:1 0 0 1}
td{border:black dashed;border-width:0 1 1 0}

This will give you the following effect:

Table Border Using Css

To show crewel border to the table try this code:

table{ border:teal 4 double}
td{ border:teal 1 solid }

This will give you following effect:

Table Border Using Css