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

The full HTML code for the table displayed above is:

                  < h t m l >
                  < h e a d >
                     < t i t l e > A n  A d v a n c e d  T a b l e s  E x a m p l e < / t i t l e >
                  < / h e a d >
                  < b o d y >
                  < c e n t e r >
                  < t a b l e  w i d t h = " 7 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 > < b > < f o n t  f a c e = " T i m e s  N e w  R o m a n " > T e a m  B o w l i n g  S c o r e s
                  F o r  t h e  W e e k  o f  D e c e m b e r  4 t h < / f o n t > < / b > < / c a p t i o n >
                     < t r >
                       < t h > & n b s p ; < / t h >
                       < t h  c o l s p a n = " 2 " > T e a m < / t h >
                     < / t r >
                     < t r >
                       < t d > & n b s p ; < / t d >
                       < t d  a l i g n = " c e n t e r " > < b > T h e  B o s t o n  B o w l e r s < / b > < / t d >
                       < t d  a l i g n = " c e n t e r " > < b > L y n n  L a n e  D a n c e r s < / b > < / t d >
                     < / t r >
                     < t r >
                       < t d  r o w s p a n = " 3 " > & n b s p ; G a m e - b y - G a m e  S c o r e < / t d >
                       < t d  a l i g n = " r i g h t " > 5 0 5 < / t d >
                       < t d  a l i g n = " r i g h t " > 5 5 0 < / t d >
                     < / t r >
                     < t r >
                       < t d  a l i g n = " r i g h t " > 6 0 0 < / t d >
                       < t d  a l i g n = " r i g h t " > 6 0 0 < / t d >
                     < / t r >
                     < t r >
                       < t d  a l i g n = " r i g h t " > 5 7 5 < / t d >
                       < t d  a l i g n = " r i g h t " > 6 2 5 < / t d >
                     < / t r >
                     < t r >
                       < t d  a l i g n = " r i g h t " > < b > T o t a l  S c o r e : < / b > < / t d >
                       < t d  a l i g n = " r i g h t " > < b > 1 , 6 8 0 < / b > < / t d >
                       < t d  a l i g n = " r i g h t " > < b > 1 , 7 7 5 < / b > < / t d >
                     < / t r >
                     < t r >
                       < t d  c o l s p a n = " 3 "  a l i g n = " c e n t e r " > C o n g r a t u l a t i o n s  t o  t h e  L y n n
                  L a n e  D a n c e r s ,  s e e  y o u  a l l  n e x t  w e e k ! < / t d >
                     < / t r >
                  < / t a b l e >
                  < / c e n t e r >
                  < / b o d y >
                  < / h t m l >



               Using Colors in Your Tables
               Like many other HTML elements, tables can be spruced up tremendously through the use of
               color.   HTML allows website designers to control color for almost every aspect of tables,
               from the table itself, to table rows, to individual cells.

               To use colors, the b g c o l o r attribute is used.  It can be used within the < t a b l e >, < t r >, or
                      tags.                                                                               tag
               < t d >       For example, to create a table with a black background, the < t a b l e >
               would be:
                                             < t a b l e  b g c o l o r = ” # 0 0 0 0 0 0 ” >



               LoudOffice.com Guide to HTML – Part II                                                Page 9
   4   5   6   7   8   9   10   11   12   13   14