8
<th>Salary</th>
</tr>
<tr>
<td>Ramesh Raman</td>
<td>5000</td>
</tr>
<tr>
<td>Shabbir Hussein</td>
<td>7000</td>
</tr>
</table>
</body>
</html>
This will produce following result:
Name
Salary
Ramesh Raman
5000
Shabbir Hussein
7000
Cellpadding and Cellspacing Attributes
There are two attribiutes called
cellpadding
and
cellspacing
which you will use to adjust the
white space in your table cells. The cellspacing attribute defines the width of the border, while
cellpadding represents the distance between cell borders and the content within a cell.
Colspan and Rowspan Attributes
You will use
colspan
attribute if you want to merge two or more columns into a single column.
Similar way you will use
rowspan
if you want to merge two or more rows.
Tables Backgrounds
We can set table background using one of the following two ways:
bgcolor
attribute - You can set background color for whole table or just for one cell.
background
attribute - You can set background image for whole table or just for one
cell.
Table Header, Body, and Footer
Tables can be divided into three portions: a header, a body, and a foot. The head and foot
are rather similar to headers and footers in a word-processed document that remain the same for
every page, while the body is the main content holder of the table.
The three elements for separating the head, body, and foot of a table are:
<thead>- to create a separate table header.
<tbody> - to indicate the main body of the table.
<tfoot>- to create a separate table footer
A table may contain several <tbody> elements to indicate different
pages
or groups of data. But it
is notable that <thead> and <tfoot> tags should appear before <tbody>
(OR)
18.b (i)
Explain various forms of INPUT tag with example.[5]
Single-line text input controls
- This control is used for items that require only one line of user input,
such as search boxes or names. They are created using HTML <input> tag.
Example