|
<FONT ...><FONT ...>
<TABLE BORDER BGCOLOR=NAVY> <TR> <TH><FONT COLOR=WHITE FACE="Geneva, Arial" SIZE=6>fruit</FONT></TH> <TH><FONT COLOR=WHITE FACE="Geneva, Arial" SIZE=6>state</FONT></TH> </TR> <TR> <TD><FONT COLOR=WHITE FACE="Geneva, Arial" SIZE=6>apples</FONT></TD> <TD><FONT COLOR=WHITE FACE="Geneva, Arial" SIZE=6>Washington</FONT></TD> </TR> <TR> <TD><FONT COLOR=WHITE FACE="Geneva, Arial" SIZE=6>pineapples</FONT></TD> <TD><FONT COLOR=WHITE FACE="Geneva, Arial" SIZE=6>Hawaii</FONT></TD> </TR> </TABLE>
If you're in this situation, styles will make your life simpler.
Let's look at an example. The following styles code (in a STYLE tag or in a style sheet file) creates a rule that applies to elements of the boldtable class, and also to
<TD ...><TH ...>boldtable class:
.boldtable, .boldtable TD, .boldtable TH
{
font-family:sans-serif;
font-size:20pt;
color:white;
background-color:navy;
}
We can apply this style to an entire table by simply setting the class of the table to boldtable:
<TABLE BORDER CLASS="boldtable"> <TR> <TH>fruit</TH> <TH>state</TH> </TR> <TR> <TD>apples</TD> <TD>Washington</TD> </TR> <TR> <TD>pineapples</TD> <TD>Hawaii</TD> </TR> </TABLE>
which gives us this table:
| fruit | state |
|---|---|
| apples | Washington |
| pineapples | Hawaii |
The keen observer will notice that there's some redundancy in the selector. After all, if we set the entire table to the boldtable class, then it should automatically apply to the <TD ...><TH ...><TD ...><TH ...>
|
Recommended Resources |
|||
| web hosting tutorials Credit Help |
Search the Internet Search Engine Help |
Low Fat Lifestyle Internet Traffic |
Web
Hosting Web Design |
|
Discount
Hotel Reservations All
Rights Reserved, Copyright © Free-HTML-Tutorials.com 2003 |
|||