HTML Code for given Table.

Practical : 5
Subject : Web Technology
Aim : Write HTML Code for following Table.
Code:

<!DOCTYPE html>
<html>
<head>
<title>Table</title>
<style type="text/css">
table,tr,td,th {border: 1px solid black;text-align: center;}
td.blue {background: #00fff2;}
td.yellow {background: #ffc814;}
</style>
</head>
<body>
<table>
<tr style="font-weight: bold;">
<td colspan="4">Work Contact Points</td>
</tr>

<tr style="font-weight: bold;">
<td>Name</td>
<td>Email</td>
<td>Phone</td>
<td>Floor/BLock</td>
</tr>

<tr>
<td class="yellow">Fred</td>
<td class="blue">fred@megacorp.com</td>
<td class="yellow">123456</td>
<td rowspan="2" style="background: #07bbed;">1/A</td>
</tr>

<tr>
<td class="blue">Jon</td>
<td class="yellow">jon@megacorp.com</td>
<td class="blue">234567</td>
</tr>

<tr>
<td class="yellow">Bill</td>
<td class="blue">bill@megacorp.com</td>
<td class="yellow">345678</td>
<td rowspan="3" style="background: #562ab7;">3/C</td>
</tr>

<tr>
<td class="blue">Jane</td>
<td class="yellow">jane@megacorp.com</td>
<td class="blue">777444</td>
</tr>

<tr>
<td class="yellow">Alison</td>
<td class="blue">alison@megacorp.com</td>
<td class="yellow">888652</td>
</tr>
</table>
</body>
</html>


Output:

Previous
Next Post »

Ads