Page 3 - LoudOffice_Guide-to-HTML_Part-II_Advanced.PDF
P. 3

How to Get Listed..................................................................................................51



               I.       Tables
               Tables are one of the most powerful layout tools available to HTML developers.  Initially only
               intended to be used for the columnar display of tabular information, tables are used
               throughout the Internet to precisely control the layout of web pages.




               Basic Table Tags
               In order to render a table, a minimum of 3 tags are used:
                   Ø The < t a b l e > tag opens and defines the table.
                   Ø The < t r > tag defines each and every row.
                   Ø The < t d > tag defines each cell within a row.

               To make a simple two-by-two table, the code would be as follows:

                           < c e n t e r >
                           < t a b l e >
                              < t r >
                                 < t d > O n e < / t d >
                                 < t d > T w o < / t d >
                              < / t r >
                              < t r >
                                 < t d > T h r e e < / t d >
                                 < t d > F o u r < / t d >
                              < / t r >
                           < / t a b l e >
                           < / c e n t e r >
               This table would display as follows:
                                                        One     Two
                                                        Three   Four


               Formatting Your Table
               As you can see in the table above, a table without formatting is not very attractive, and
               could be very difficult to read.  In order to improve the formatting of your table, there are
               many attributes that can be used in you < t a b l e > tag:
                   Ø The w i d t h attribute controls the size of the table.  The width can be expressed in
                       terms of pixels or in percent relation to the size of the window.





















               LoudOffice.com Guide to HTML – Part II                                                Page 3
   1   2   3   4   5   6   7   8