WO 26. 08. Write the HTML code to display the following table on webpage: Table specifications: border:-5, background color: Grey, Border color: blue, Height and width:-200 each. H LI Be Na Mg K Ca ||| IV V VI VII Periodic Table of Elements Sc TI V He B- No AI Ar Ga Kr Colour - Pink Font-6
Answers & Comments
Answer:
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: collapse;
width: 200px;
height: 200px;
border: 5px solid blue;
background-color: grey;
font-size: 6px;
}
th, td {
border: 1px solid pink;
padding: 2px;
text-align: center;
}
</style>
</head>
<body>
<table>
<tr>
<th>H</th>
<th>LI</th>
<th>Be</th>
<th>Na</th>
<th>Mg</th>
<th>K</th>
<th>Ca</th>
</tr>
<tr>
<td>IV</td>
<td>V</td>
<td>VI</td>
<td>VII</td>
<td>Periodic Table of Elements</td>
<td>Sc</td>
<td>Ti</td>
</tr>
<tr>
<td>V</td>
<td>He</td>
<td>B-</td>
<td>No</td>
<td>Al</td>
<td>Ar</td>
<td>Ga</td>
</tr>
<tr>
<td>Kr</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>