This table example demonstrates the use of the colspan, rowspan, and bgcolor attributes of the TD and TH elements. I use the entity   in the empty TD cells. I use named colors to set the bgcolor attributes.
Put this in the BODY of your HTML file: Displayed in a Web browser, it will look something like this:
<TABLE border="1">
<TR><TH rowspan="2" bgcolor="silver">Tasks</TH>
   <TH colspan="7" bgcolor="aqua">Days of the Week</TH></TR>
<TR> <TH>Mon</TH> <TH>Tue</TH> <TH>Wed</TH> <TH>Thu</TH> <TH>Fri</TH> <TH>Sat</TH> <TH>Sun</TH> </TR>
<TR> <TH>School</TH> <TD>&nbsp;</TD> <TD>CS290</TD> <TD>&nbsp;</TD> <TD>CS290</TD> <TD>&nbsp;</TD> <TD colspan="2" rowspan="2" bgcolor="lime">Off</TD> </TR>
<TR> <TH>Work</TH> <TD colspan="2"></TD> <TD bgcolor="yellow" colspan="3">Weekend Prep</TD> </TR>
Tasks Days of the Week
Mon Tue Wed Thu Fri Sat Sun
School   CS290   CS290   Off
Work Weekend Prep
Save this page to any social bookmarking site! Share · search Search · star Market
2022-02-10 · · Terms © December Communications, Inc.