this is the result i want
this is the result i am getting(ignore the image)
This is my code
<html>
<head>
<title> Practical 4 </title>
<meta charset ="UTf-8">
</head>
<body bgcolor ="lightblue">
<table border="1" bordercolor="black" cellspacing="1" align ="center">
<tr>
<td bordercolor ="red"> ** </td>
<td bordercolor ="blue"> আমার </td>
<td bordercolor ="green">দেশের </td>
<td bordercolor = "red" >**</td>
</tr>
<tr>
<td bordercolor ="red">**</td>
<td bordercolor ="darkblue" colspan="2" rowspan="2"> <img src="image_to_use.jpg"></td>
<td bordercolor ="red"> ** </td>
</tr>
<tr>
<td bordercolor ="red" >**</td>
<td bordercolor ="red" >**</td>
</tr>
<tr>
<td bordercolor ="red"> ** </td>
<td bordercolor ="blue">নাম</td>
<td bordercolor ="green">বাংলাদেশ </td>
<td bordercolor ="red">**</td>
</tr>
</table>
</body>
</html>
2
Answers
Instead of HTML attributes, you should use CSS.
You can color your cells with for loop in JS.
You can color your table cells with access specifier. If you want to apply the same color to multiple cells use ‘class’.
**
if you want to apply different color to each cell use ‘id’;
**
In CSS:
Style based on class
Style based on id