Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 885   Yesterday: 1,172   Max: 1,872   Total: 384,266   Current Users : 19 (Member 0) 
DOMAIN TOOLS

WEBMASTER TOOLS

RELATED ARTICLES

SUBMIT AN ARTICLE

Write for us and get publicity, link to your website, and best of all get paid. Please visit our writers page for details.


LINK TO US

Link to us and earn points for each visitor you bring to us. Please visit our link partner page for details.

 

<COL ...>

  • SPAN: how many columns this affects
  • ALIGN: horizontal alignment
 
  • WIDTH: width of the column
  • BGCOLOR: background color of the column

<COL ...> sets properties for a column of table cells. <COL ...> is an HTML 4.0 tag. Currently only MSIE and Netscape 6 recognize it.

<COL ...> goes after the <TABLE ...> tag and before any <TR ...>, <THEAD ...>, or <TBODY ...> elements. (It may go inside a <COLGROUP ...> element but it doesn't have to.) Each <COL ...> defines the properties of one column, unless you use SPAN to indicate that it is for more than one column. So the first <COL ...> sets the properties for the first column, the second <COL ...> sets the properties for the second column, and so on.

For example, the following code uses three <COL ...> tags to set properties of the cells in the first, second, and third columns of the table. The first <COL ...> doesn't do anything except serve a placeholder for the first column. The second <COL ...> uses the ALIGN attribute to right align all the cells in the second column. The third <COL ...> uses STYLE to set the styles of the cells in the third column so that the font color is red:

<TABLE BORDER CELLPADDING=5>

<COL>
<COL ALIGN=RIGHT>
<COL STYLE="color:red">

<TR> <TH>Expense</TH> <TH>Price</TH> <TH>Status</TH> </TR>
<TR> <TD>office suite</TD> <TD>1,343.56</TD> <TD>rental</TD> </TR>
<TR> <TD>cabling</TD> <TD>1.25</TD> <TD>installed</TD> </TR>
</TABLE>

which gives us this table:

Expense Price Status
office suite 1,343.56 rental
cabling 1.25 installed

It's important to be absolutely clear on this point: <COL ...> does not create columns. It merely sets the properties of columns that will be defined later in the code. Cells are not "contained" in <COL ...> elements, they just set attributes which are applied to the cells in that column position.



Copyright 1997-2002 Idocs, Inc. Written by Miko Sullivan.

 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2008 Broadband Media, Inc. All rights reserved.