1 / 11

HTML Tables

HTML Tables. <table> … </table> surround table <tr> … </tr> surround each row <td> … </td> surround each cell <th> … </th> like <td> , but bold and centered by default (for table headings) <caption> … </caption> table title.

kmcdowell
Télécharger la présentation

HTML 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. HTML Tables • <table> … </table> surround table • <tr> … </tr> surround each row • <td> … </td> surround each cell • <th> … </th> like <td>, but bold and centered by default (for table headings) • <caption> … </caption> table title No tag to define a column. Number of columns determined by number of <td></td> pairs in a given row.

  2. Tables and CSS • Use CSS to format tables • background-color, color, font-family, padding, margin, border, text-align … all work with tables and cells • border-collapse: collapse; with without

  3. Spanning Rows and Columns • Can create “irregular” tables • colspan attribute of td: # columns a cell spans <tr> <td colspan=2>A</td> </tr> <tr> <td>B</td> <td>C</td> </tr>

  4. Spanning Rows and Columns • rowspan attribute of td: # rows a cell spans <tr> <td>A</td> <td rowspan=2>B</td> </tr> <tr> <td>C</td> </tr> 29

  5. Spanning Rows and Columns

  6. Planning the Table Anniversary Gift 1st Paper 8th Pottery 9th Happy…

  7. Using tables for layout -------- message --------

  8. Using tables for layout

  9. Exercise

  10. Exercise 2 pixel red border 5 pixels btwn text & border

  11. Exercise

More Related