Front End Lecture 6
Front End Lecture 6
Front End Lecture 6
(Html)
LECTURE-6
Today’s Agenda
Attributes Of Table
<table >
<tr>
<td> some data</td>
<td>some data</td>
</tr>
<tr>
<td>some data</td>
<td>some data</td>
</tr>
</table>
Creating Header Cells
cellspacing
Empty space between table data cells.
cellpadding
Empty space between the edge of a cell and cell content.
Various Attribute Of <table> Tag
align
Aligns the table to the left, right or center.
width/height
The width/height of the table; measured in pixels or percentage.
bgcolor
Background color for all cells that do not have a background color or
image specified.
Various Attribute Of <table> Tag
background
Background image for all cells that do not have a background color or
image specified.
bordercolor
Border color for the table.
Attributes Of <tr> Tag
1.bgcolor
This attribute is like the one set in the table only it will define
the background color for the row only and not the entire
table.
<tr bgcolor=“#00FF00">
Attributes Of <tr> Tag
2. align
The align attribute for the table row is different from the table align
attribute, this aligns the content in the row with respect to the table. The
values are: left, right and center. The default. Left
<tr align=“right">
3. valign
This is the vertical alignment attribute. It defines the vertical alignment of
the content within the row. The values for this attribute are: top, middle,
bottom. The default setting is middle.
<tr valign=“bottom">
Attributes Of <td> Tag
1. bgcolor
Just like the bgcolor attribute in the tr tag, this attribute
works the same. It will define a background color for each
cell.
<td bgcolor="#0000FF">
Attributes Of <td> Tag
2. align
This attribute also works the same as in the tr tag, it will align
the content in within each cell. The values are: left, right, and
center. The default is Left .
<td align="center">
Attributes Of <td> Tag
3. valign
<td valign=“top”>
Using “colspan” And
“rowspan” Attributes
Table cells can span across more than one column or row.
<table >
<tr>
<td> some data</td>
<td>some data</td>
</tr>
<tr>
<td colspan=“2”>some data</td>
</tr>
</table>
“rowspan” Syntax
<table >
<tr>
<td rowspan=“2”> some data</td>
<td>some data</td>
</tr>
<tr>
<td >some data</td>
</tr>
</table>
EXERCISE
End Of Lecture