Page 10 - LoudOffice_Guide-to-HTML_Part-II_Advanced.PDF
P. 10
Every row and every cell within the table will have a black background. You can also use
the b g c o l o r attribute to declare color for entire rows or individual cells. For example the
following table has a gray background, but contains an entire row with a black background
and one cell with a white background.
The HTML code for this table is:
< t a b l e b o r d e r = " 2 " b g c o l o r = " # 8 0 8 0 8 0 " w i d t h = " 4 5 0 " >
< t r >
< t d c o l s p a n = " 3 " a l i g n = " c e n t e r " w i d t h = " 1 0 0 % " >
< f o n t c o l o r = " # F F F F F F " > < b > A G r a y T a b l e < / f o n t > < / b >
< / t d >
< / t r >
< t r >
< t d > & n b s p ; < / t d >
< t d w i d t h = " 3 4 % " > & n b s p ; < / t d >
< t d w i d t h = " 3 3 % " > & n b s p ; < / t d >
< / t r >
< t r b g c o l o r = " # 0 0 0 0 0 0 " >
< t d a l i g n = " c e n t e r " w i d t h = " 3 3 % " > & n b s p ; < / t d >
< t d a l i g n = " c e n t e r " w i d t h = " 3 4 % " >
< f o n t c o l o r = " w h i t e " > < b > T h i s R o w i s B l a c k < / b > < / f o n t >
< / t d >
< t d w i d t h = " 3 3 % " > & n b s p ; < / t d >
< / t r >
< t r >
< t d > & n b s p ; < / t d >
< t d w i d t h = " 3 4 % " > & n b s p ; < / t d >
< t d w i d t h = " 3 3 % " > & n b s p ; < / t d >
< / t r >
< t r >
< t d > & n b s p ; < / t d >
< t d b g c o l o r = " # F F F F F F " a l i g n = " c e n t e r " w i d t h = " 3 4 % " >
< b > T h i s C e l l i s W h i t e < / b >
< / t d >
< t d w i d t h = " 3 3 % " > & n b s p ; < / t d >
< / t r >
< / t a b l e >
II. HTML Forms
Forms are one of the most common elements used throughout the web. Forms are
primarily used to collect information from a user and process it. Processing can include
LoudOffice.com Guide to HTML – Part II Page 10