Page 6 - LoudOffice_Guide-to-HTML_Part-II_Advanced.PDF
P. 6

Ø Headings are declared with the < t h > tag, which is used in place of the < t d > tag.
                       Data that appears in the < t h > tag is normally bolded so that it stands out from other
                       text within the table.

               An Example:


                           < t a b l e  w i d t h = " 2 5 % "  b o r d e r = " 2 "  c e l l s p a c i n g = " 2 "
                           c e l l p a d d i n g = " 2 " >
                              < c a p t i o n  a l i g n = ” t o p ” > A  S i m p l e  T a b l e < / c a p t i o n >
                              < t r >
                                 < t h > C o l u m n  1 < / t h >
                                 < t h > C o l u m n  2 < / t h >
                              < / t r >
                              < t r >
                                 < t d > O n e < / t d >
                                 < t d > T w o < / t d >
                              < / t r >
                              < t r >
                                 < t d > T h r e e < / t d >
                                 < t d > F o u r < / t d >
                              < / t r >
                           < / t a b l e >


















               Controlling Alignment
               Like with other elements, HTML gives you the ability to control alignment of and within
                                                                                         and < t d > tags) are
               tables.  The two main attributes used (within the < t a b l e > ,  < t r > ,
                       and v a l i g n.  Normally, a l i g n controls horizontal (left to right) alignment, while
               a l i g n
               v a l i g n controls vertical (top to bottom) alignment.
               Controlling the Alignment of Tables
               Like with images, tables can be floating, that is they can have text wrapped to the left or
               right of them.  To control the floating alignment of tables, the a l i g n attribute is used.  This
               attribute can have one of two values: r i g h t or l e f t.  An example is given below:
                              < t a b l e  w i d t h = " 2 5 % "  b o r d e r = " 5 "  c e l l s p a c i n g = " 1 0 "
                                         c e l l p a d d i n g = " 1 2 "  a l i g n = " r i g h t " >











               LoudOffice.com Guide to HTML – Part II                                                Page 6
   1   2   3   4   5   6   7   8   9   10   11