Tables in HTML / PDF







Table of Contents:


1. Basic table building 
    1.1. A simple table
    1.2. Captioning a table
    1.3. Specifying dimensions
    1.4. Specifying horizontal alignment of cells
    1.5. Specifying vertical alignment for a whole row

2. Attributes of the <table> tag 

3. Column and row headings 

4. Spanned cells 

5. A look ahead: HTML 4.01 tables 
   5.1. Specifying the alignment for an entire column
   5.2. Column grouping
   5.3. Table headers and footers



------------------------------------------------------


Sample of the pdf document : 



1.1. A simple table:

Here is a trivial table of two rows and two columns:

<table>
<tr><td>New Mexico <td>Santa Fe
<tr><td>Utah <td>Salt Lake City
</table>

• The entire table is contained between <table> and </table> tags
• Each table row starts with a <tr> tag.
• Each cell starts with a <td> tag. A cell is one column of one row.

1.2. Captioning a table
To add a title to a table, place the caption text between <caption> and </caption> tags just after the
<table> tag:

<table>
<caption>Southwestern Capitals</caption>
<tr><td>New Mexico <td>Santa Fe
<tr><td>Utah <td>Salt Lake City
</table>

You can use an align="bottom" attribute in the <caption> tag to position the caption below the
table. The default placement is at the top. For example:

<caption align="bottom">Southwestern Capitals</caption>..........





                                               Click here for  Download PDF / FREE
                                                                                                  

0 commentaires: