Page 98 - Touchpad_Plus_V3.2_Class 7
P. 98
types of border styles which are Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset,
None and Hidden. 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 color to the border. For example:
<style>
table, th, td
{ Clickipedia
border:2px;
Basic mistakes to avoid while writing HTML code:
border-style:solid;
Don't skip the angular brackets to close the tag.
border-color:green;
Always use doctype to tell the browser what type of
}
document to expect.
</style>
Let us create a table using the above properties.
<!DOCTYPE html>
<HTML>
<HEAD> <TITLE> Students of Class 7</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>
96 Plus (Ver. 3.2)-VII

