2nd Meeting MIDTERMIntroduction To HTML Programming
2nd Meeting MIDTERMIntroduction To HTML Programming
<TABLE>
Collapsed Borders
If you want the borders to collapse into one border, add the CSS border-collapse property:
<ATTRIBUTES OF TABLE>
Align - Positions the flush left, right, or in the center of the window.
<table align=”center”>
Background - Specifies the relative or absolute location of the graphic image file loaded as a
<table background=”URL”> background image for the entire table.
BGCOLOR - Specifies the background color within all table cells in the table.
<table bgcolor=”red”>
BORDER - Specifies the thickness of borderaroundthe table cells. Use a value 0 to produce
<table border=”3”> a table with no visible borders.
BORDERCOLOR - Specifies the color of the borders of all the table cells in the table.
<table border=”3” bordercolor=”red”>
BORDERCOLORDARK - Specifies the darker color used to draw 3-D borders around the table cells.
<table border=”3” bordercolordark=”black”>
BORDERCOLORLIGHT -Specifies the lighter color used to draw 3-D borders around the table cells.
<table border=”3” bordercolorlight=”gray”>
CELLPADDING - Specifies the space (in pixels) between the edges of table cells and their content.
<table border=”3” cellpadding=”10”>
CELLSPACING -Specifies the space (in pixels) between the borders of table cells and the borders of <table
border=”3” cellspacing=”10”> adjacent cells
WIDTH - Specifies the width of the table. You can set value to an absolute number of pixels or to <table
width=”35%” align=”center”> percentage amount so that the table is proportionally as wide as the available
space.
VALUES FOR THE FRAME ATTRIBUTES VALUES FOR THE RULES ATTRIBUTES
SAMPLE PROGRAM:
<html>
<head>
<title>Table</title>
</head>
<body>
<table align="center" width="50" border="15" cellpadding="3" cellpspacing="10">
<tr>
<td rowspan="3"><font color=”gray”>
<center>
A<br>R<br>N<br>I<br>E</td>
<td>ARNIE</td>
</tr><tr>
<td>GREEN</td>
<td>YELLOW</td>
<td>PINK</td>
<td>ORANGE</td>
</tr>
<tr>
<td colspan="2">APPLE</td>
<td>BANANA</td>
<td>CHICO</td>
<td>DUHAT</td>
<tr>
</table>
</body>
</html>