Getting Started HTML: The Basics More Than HTML: Audio Help Desk: Quick Reference Free Stuff:
|
This page assumes that the reader already has a working knowledge of tables. If you are wanting to learn the basic structure and layout of tables, please go to the tables tutorial Netscape 4.75 will still not read these specifications correctly, in order to view this page correctly you will need Internet Explorer 5.0 or better.
Use these attributes and tags sparingly, some of your visitors may be able to view this, others will not. If you cannot see the examples correctly, you should update your browser. <table> The <table> command, of course, begins the construction of the table. As in previous HTML specifications, the table command still incorporates border=, bordercolor=, cellpadding=, ect.. frame= The 'frame' attribute allows control of the borders inside and outside of the table:
rules= As the 'frame' attribute deals with the outside border, the rules= deals with the inside borders.
Example: <table align=center border=2 bordercolor="blue" frame="hsides" rules="cols"> Will produce:
summary= The summary attribute deals with non-visual media. It gives a summary of the table's purpose and/or structure. It was designed for voice systems for the blind. <table summary="This is an example table">
Any formatting attribute such as borders, frames, ect., can be added and will be displayed on the screen as usual. The summary is not displayed, it is for non-visual media only. EventHandlers: In HTML 4.0, event handlers such as onmouseover/onmouseout, onClick, and style attributes can be used inside the <table> command: Example: <table onmouseover="window.status='Click here';return true" onmouseout="window.status=' ';retrun true" onClick="alert('Wow, that is great')" border=2 bordercolor="red"> Will produce:
<colgroup> The 'colgroup' command lets you to set parameters to the data in columns of a table. It can set up widths, colors, and Style Sheet effects.
Example: <table border=2 frame="vsides" rules="cols" bordercolor="purple" width="80%" align=center>
<tr> Will produce:
<tbody> The 'tbody' command works similarly to the 'colgroup' command except that it will allow you to surround some or all cells, not just columns. The same attributes work with 'tbody' as it does in colgroup and also uses the bgcolor attribute. Example: <table width="85%" align=center border=3 bordercolor="purple" frame="above" rules="hls"> Will produce:
<thead> & <tfoot> The 'thead' and 'tfoot' work as a header and footer. The 'thead' must be place immediately after the 'table' command, much like the <head> in the HTML document. The 'tfoot' must follow immediatly after the 'thead'. Although, you can use both commands or either alone, but there can be only one 'thead' and one 'tfoot' in a single table. The attributes are:
Example: <table width="85%" border=3 bordercolorlight="red" frame="vsides" rules="rows" align=center> Will produce:
<td> Additional attributes to the 'td' command are:
<TH> & <TR> The 'th' and 'tr' commands will accept the same six new attributes as the 'td' command, as well as the align, valign, and other previous values. That's all I will be covering here. If you would like more technical information about the commands covered here, W3C has an indepth explination of each command, attribute, value, function, and application purpose. |