HTML Table Border

HTML Table Border

How to set border around table?

Explanation

Table with border

To make things much clear, we will put border to the table using the attribute “border”.
This attribute should be added in “table” tag.
Example :

<table border=1>

This is first column

This is second column

Result :

The result for above tag will be as

This is first column This is second column

Table with 2 row 2 col

Now we will try to create a table with 2 row and 2 cols each
Example :

<table border=1>

This is 1st row 1st column

This is 1st row 2nd column

This is 2nd row 1st column

This is 2nd row 2nd column

Result :

The result for above tag will be as

This is 1st row 1st column This is 1st row 2nd column
This is 2nd row 1st column This is 2nd row 2nd column

Leave a Reply

Your email address will not be published. Required fields are marked *