HTML and CSS Reference
In-Depth Information
<table width="80%" border="0" cellpadding="10" cellspacing="0">
<tr bgcolor="#E6E6FA">
<td colspan="3"><h1>Logo Banner Area</h1></td>
<td width="100" valign="top" bgcolor="#E6E6FA">Navigation</td>
<td width="10">&nbsp;</td>
<td valign="top"> <h2>Page Content Heading</h2>
<h3>School History</h3>
<table width="90%" border="1" summary="This table lists
educational background. Each row describes educational
experience at a specific school. Columns contain school
attended and subject." >
<th>School Attended</th>
<td>Schaumburg High School</td>
<td>College Prep</td>
<td>Harper College</td>
<td>Internet &amp; Web Development</td>
Use this technique when a Web page layout is configured with a table and you also
want to use a table to further organize information on the page. Be careful to nest
tables only when needed because nested tables can slow the browser display of Web
pages. When designing a page with nested tables it is helpful to sketch your page on
paper before hand-coding. You can nest more than one set of tables inside one another.
When HTML was developed it was not intended to be a page layout language—the table
element was intended to display tabular data and to organize information. Disadvantages
to using multiple levels of nested tables on a Web page include complicated and difficult
to read source code (resulting in a larger .html file size and a slower browser display).
Some browsers, such as Netscape, have difficulty displaying complicated nested tables.
Even with these disadvantages, tables are still widely used for page layout.
Legacy Alert. Although page layout tables will continue to be used on the Web for many
years, a newer and preferred design technique uses CSS to configure Web page layouts
instead of tables. That is the reason why some of the attributes used with <table> ( align
and bgcolor ), <tr> ( bgcolor ), and <td> ( bgcolor , width ) elements are deprecated.
Throughout most of this textbook, you've been using CSS to configure page layout. There
are advantages to using CSS—easier-to-read source code, smaller .html file sizes, and
Search WWH ::

Custom Search