Page 40 - PortGPT_V2.1_C7_Flipbook
P. 40
You can use any one of these styles at a time. If you use the None style, the border will not appear.
For example:
<style>
table, th, td {border:2px; border-style:solid;}
</style>
Using border-color Property
The border-color property allows you to apply a colour to the border. For example,
<style>
table, th, td
{
border:2px;
border-style:solid;
border-color:green;
}
</style>
Let us create a table using the above properties.
<!DOCTYPE html>
<HTML>
<HEAD> <TITLE> Students of Class 8 </TITLE>
<STYLE>
TABLE, TH, TD
{
border:2px;
border-style:solid;
border-color:green;
}
</STYLE>
</HEAD>
<BODY>
<TABLE>
<CAPTION> Table : Student </CAPTION>
<TR>
<TH> Roll No. </TH>
<TH> Name </TH>
<TH> Grade </TH>
<TH> Gender </TH>
</TR>
<TR>
<TD> 1 </TD>
38 Premium Edition-VII

