Chemistry 524 HTML Primer

Tables <TABLE [...]> Start tag of a table. Must end with the </TABLE> tag. The following parameters are allowed: ALIGN=left|right Align the table. IE NS BORDER=n Gives the table a 3D-look. n is the width of the border in dots. CELLSPACING=n Sets the space between cells in dots. CELLPADDING=n Sets the space between the contains of the cells to the cells border. WIDTH=n|n% Sets the width of the table in dots or in percent of the page. HEIGHT=n|n% Sets the height of the table in dots or in percent of the page. BACKGROUND=url Defines a background of the table. IE BGCOLOR=color Defines the background color of the table. Requires Explorer or Netscape 3.x. IE NS BORDERCOLOR=color Defines the border color of the table. IE BORDERCOLORLIGHT=color Defines the light shadow color of the table. IE BORDERCOLORDARK=color Defines the dark shadow color of the table. IE FRAMES=void|above|below|hsides|vsides|lhs|rhs|box This is an Internet Explorer which defines which siedes of the table border that will be displayed. IE RULES=NONE|ROWS|COLS|GROUPS This is an Internet Explorer tag that can be used to just show horizontal or vertical rules in the table. NONE will just show the table frame. GROUPS will display lines between the THEAD, TBODY and TFOOT tags. IE Table tags <CAPTION [ALIGN=TOP|BOTTOM]>text</CAPTION> "text" will be the tables header. Use this tag inside the <TABLE> tag, but not within lines. You can show the header over or under the TABLE by setting ALIGN to TOP resp. BOTTOM. <TR [ALIGN=LEFT|CENTER|RIGHT] [VALIGN=TOP|MIDDLE|BOTTOM|BASELINE] [BACKGROUND=url] [BGCOLOR=color] [HEIGHT=n|n%] [BORDERCOLOR=color] BORDERCOLORLIGHT=color] [BORDERCOLORDARK=color]> Start a new line in the table. ALIGN sets the horizontal adjusments for the lines text and VALIGN the vertical adjustment. BGCOLOR is a background color. HEIGHT is the minimum height of the row in pixels or percent. HEIGHT is not defined in a HTML standard, but works in Netscape 2.x. Do not need to end with </TR> according to HTML 3.2, but see below about nested tables. (IE) <TD|TH [ALIGN=LEFT|CENTER|RIGHT] [VALIGN=TOP|MIDDLE|BOTTOM|BASELINE] [NOWRAP] [COLSPAN=N] [ROWSPAN=N] [WIDTH=N] [BACKGROUND=url] [BGCOLOR=color] [HEIGHT=n|n%] [BORDERCOLOR=color] BORDERCOLORLIGHT=color] [BORDERCOLORDARK=color]> TD and TH insert a new cell. TH stands for 'table header' and displays the contents of the cell in bold. ALIGN sets the adjustments of the text. NOWRAP prevents the browser from wrapping the cell contents. COLSPAN can be used to let the cell go over more than one column. Default is 1. ROWSPAN is the same thing, but let the cell go over more than one line. Default setting is 1. WIDTH sets the width of the cell. BGCOLOR is a background color. HEIGHT is the minimum height of the cell in pixels or percent. (IE) <THEAD>, <TBODY>, <TFOOT>, <COLGROUP>, <COL> This is Explorer extensions, mostly for use with the FRAME parameter to the TABLE tag. Not supported in other browsers and therefore not detailed explained here. IE The ending </TR>, </TD> or </TH> is not required in HTML 3.2 since any following tag defining a row, cell or table closes the previous cell definition, but because of a bug in Netscape Navigator it is necessary to include these end tags when using nested tables.