Page 116 - Plus_V2.2_C7_Flipbook
P. 116
Using background-color Property
The background-color property is used to specify the colour of the background in a table on the web
page. You can apply colour in a cell, row or entire table.
For example,
<STYLE>
table, th, td
{ border:2px;
border-style:solid;
border-color:green;
background-color:orange; }
</STYLE>
Using background-color Property
Using color Property
The color property is used to specify the text colour. For example,
<STYLE>
table, th, td
{ border:2px;
border-style:solid;
border-color:green;
background-color:orange;
color:blue; }
</STYLE>
Using color Property
Creating a table using all the table tags above.
<STYLE>
table, th, td {
border: 2px solid green;
border-style: dashed;
background-color: pink;
color: blue;
border-spacing: 15px;
width: 40%;
height: 50px;
}
td{ padding:10px; }
</STYLE>
114 Premium Edition-VII

