1 / 10

Basics of Tables

Basics of Tables. Tables Give Flexibility. Are arranged in rows and columns In XHTML, you do not directly define the columns of a table Calculated by browser based on maximum number of cells in any given row. Tables/HTML. The language wasn’t intended for laying out pages

beck-patel
Download Presentation

Basics of Tables

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Basics of Tables

  2. Tables Give Flexibility • Are arranged in rows and columns • In XHTML, you do not directly define the columns of a table • Calculated by browser based on maximum number of cells in any given row

  3. Tables/HTML • The language wasn’t intended for laying out pages • The table feature was adapted • Not the best system (use CSS) • Requires large amounts of code • Creates problems for disabled users, search engines • Difficult to maintain

  4. Basic Table

  5. A Look at Table HTML • <table width="80%" border="1" cellspacing="0" cellpadding="0"> • <tr> • <td></td> • <td></td> • <td>></td> • </tr> • <tr> • <td></td> • <td></td> • <td></td> • </tr> • </table>

  6. Add Data to Table • The source would now look like this: • <table width="80%" border="1" cellspacing="0" cellpadding="0"><tr><td>Yo</td><td>Graphic of NJ or text here</td><td>></td></tr><tr><td></td><td></td><td>Corzine or Christie?</td></tr></table>

  7. Modify Table • <table width="80%" border="1" cellspacing="0" cellpadding="2"><tr><td rowspan ="2">Hi</td><td></td><td>></td></tr><tr> <td></td><td></td></tr></table>

  8. Borders • <table width="80%" border="1" cellspacing="0" cellpadding="2" bordercolor="#0000CC"> • <TR> • <TD rowspan="2"></TD> • <TD></TD> • <TD></TD> • </TR> • <TR> • <TD></TD> • <TD></TD> • </TR> • </TABLE>

  9. Review • <TABLE> opens the table, and </TABLE> closes it • <TR></TR> specifies the beginning and ending of a table row • <TD></TD> specifies the beginning and ending of table or cell data<TD rowspan="#"></TD> combines 2 or more cells into one • bgcolor="######" gives the table a background color • bordercolor="######" gives the table a border color, if border is 1 or higher in size • border="#" the size of the table border • <TD align=""></TD> aligns the contents of the cell, values in between the quotes are either left, right or center

More Related