Page 84 - Learn To Use HTML and CSS
P. 84

So You Want to Learn to Use HTML and CSS – Version 2020-06-12a                        Page 74
               Chapter 7 — Lists and Tables


             Free








             eBook
















                            Illustration 22: A Definition List
             Edition (Glossary)
            Please support this work at
               Tables


               Using tables on a webpage is another great way to organize information. Tables should ONLY be
                                  http://syw2l.org
               used for data that needs to be displayed in a tabular format. Older HTML often used tables to
               format pages and for general layout, this is not an appropriate use of tables.
                                                                               Free
               Simple tables are written using the <table>...</table> tag containing rows of
                                                                                       90 91
               <tr>...</tr> tags and columns of data using <td>...</td> tags.



               The size of a table is determined with the number of rows and columns you create. Usually you
               would want to define the same number of columns on each row. In the example below, we create
                                                                   eBook
               a table with three rows and two columns.



                <table>
                    <tr>
                         <td>Susan</td>
                         <td>Jones</td>
                                                                Edition
                    </tr>
               90   https://html.spec.whatwg.org/multipage/tables.html#the-table-element

               91     https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td

               Copyright 2020 — James M. Reneau PhD — http://www.syw2l.org — This work is
               licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
   79   80   81   82   83   84   85   86   87   88   89