Slip 9 - B) Write the HTML code which generates the following output.(use internal CSS to format the table

Solution:

<html>
<head>
<style type="text/css">
table, th, td { border: 2px solid green ;}
</style>
</head>
<body>
<table>
<tr>
<th >Country</th>
<th colspan="2">Population (in Crores)</th>
</tr>
<tr>
<td rowspan="3">Indian</td>
<td>1998</td>
<td>85</td>
</tr>
<tr>
<td>1999</td>
<td>90</td>
</tr>
<tr>
<td>2000</td>
<td>100</td>
</tr>
<tr>
<td rowspan="3">USA</td>
<td>1998</td>
<td>30</td>
</tr>
<tr>
<td>1999</td>
<td>35</td>
</tr>
<tr>
<td>2000</td>
<td>40</td>
</tr>
</table>
</body>
</html>

Post a Comment

0 Comments