Place css style between inside the <head> tag.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
...
...
</style>
</head>
<body>
<p>Your page's content!</p>
</body>
</html>
To specify table borders in CSS, use the border property.
table, th, td { border: 1px solid black;}
To display a single border for the table, use the border-collapse property.
table { border-collapse:collapse; }
table,th, td { border: 1px solid black; }
Table Width and Height
Width and height of a table is defined by the width and height properties.
table { width:75%; }
th { height:60px; }
Table Text Alignment
The text in a table is aligned with the text-align and vertical-align properties.
The text-align property sets the horizontal alignment, like left, right, or center
td { text-align:right; }
The vertical-align property sets the vertical alignment, like top, bottom, or middle
td { height:60px; vertical-align:bottom; }
TABLE element
All elements of a table is constructed (ie TABLE, TR, TD and TH, but THEAD, TBODY, TFOOT, COL and COLGROUP).
<TABLE>
<CAPTION>This is the caption</CAPTION>
...
</TABLE>
<table width="75%" border="1" cellpadding="2" cellspacing="2">
<CAPTION>This is the caption</CAPTION>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
Previous page: HTML input Tag
Next page: The Basics of PHP Objects