1 / 13

Creating a Data Table

Creating a Data Table. Web Design – Section 3-8. Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials. Objectives. The Student will: Understand the HMTL tags associated with data tables. Be able create a simple data table .

dorit
Télécharger la présentation

Creating a Data Table

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. Creating a Data Table Web Design – Section 3-8 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials

  2. Objectives • The Student will: • Understand the HMTL tags associated with data tables. • Be able create a simple data table

  3. HMTL Tags for Tables • HTML tables begin and end with table elements: <table></table>. • The opening table element should include a summary attribute, which is read by screen readers in order to give blind users an overview of what the table contains and how it's organized. Being informed of this information up front helps blind users to more easily navigate the table and understand what they're hearing. Example: <table summary="Your brief table description here">

  4. HMTL Tags for Tables • A table's caption (brief descriptive text, usually displayed above the table) begins and ends with caption elements: <caption> • Each row in a table begins and ends with table row (tr) elements: <tr></tr>

  5. HMTL Tags for Tables • Each cell in the table begins and ends with either table header (th) elements or table data (td) elements, depending on what type of information the cell contains. • If a cell contains headers, it begins and ends with th elements: <th></th> • If a cell contains data (not headers), it begins and ends with td elements: <td></td>

  6. HMTL Tags for Tables • Table header elements (th) should also include a scope attribute, which is either scope="row" or scope="col". This instructs screen readers as to which headers apply to which cells. Screen readers read tables row by row from left to right, and without this extra markup blind users would have a difficult time if the header applies to the column

  7. HTML Table Example • Let’s look at the HMTL to create this table

  8. HTML Table Example <table summary="Two school lunch menu choices in two rows, with columns corresponding to school days Monday through Friday"> <caption>School Lunch Menu</caption>

  9. HTML Table Example <tr> <td> </td> <th scope="col">Monday</th> <th scope="col">Tuesday</th> <th scope="col">Wednesday</th> <th scope="col">Thursday</th> <th scope="col">Friday</th> </tr>

  10. HTML Table Example <tr> <th scope="row">Carnivores</th> <td>Sausage pizza</td> <td>Corn dogs</td> <td>Sloppy Joe</td> <td>Beef taco</td> <td>Chicken and dumplings</td> </tr>

  11. HTML Table Example <tr> <th scope="row">Herbivores</th> <td>Veggie pizza</td> <td>Veggie dogs</td> <td>BBQ tempeh</td> <td>Bean burrito</td> <td>Tofu teriyaki</td> </tr> </table>

  12. Summary • Tables were introduced to the web with the original purpose of displaying data in rows and columns. • Build tables using the table HTML tags • Tables are built row by row. Rest of Today • Follow the instructions to create a table. This does not go into your index.htm file. This goes in your accesibility.html page.

  13. Final Result • Final table doesn’t look great but we will come back to it later and clean it up.

More Related