What are tables and why isn't my plate on it?
Tables in HTML speak is short for tabular data. Tables have been around for a while and serve as the foundation for complicated layouts, with multiple columns, sidebars and many other features that were simply impossible before the advent of CSS.
This is a table
©
X2
Steve
Taylor
Default. Decimal numbers (1,2,3,4)
Alphabetically ordered list Uppercase(A,B,C,D)
Alphabetically ordered list Lowercase(a,b,c,d)
Roman Numerals Uppercase(I,II,III,IV)
Roman Numerals Lowercase (i,ii,iii,iv)
because colspan equaled 2
height
width
vspace
hspace
align
vspace=20
Ç
Ý
å
û
blah
http
They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses
24 years
open()
cookie
dont know
dpnt know
(img src="dog.gif")
Hello
CLEAR=ALL
Goodbye
middle refers to the y axis (up and down center refers to the x axis (left and right)
One
Two
Three
Four
Five
Six
Seven
Eight
Nine
One
Two
Three
Four
Five
Six
Seven
Eight
Nine
How to create a simple table
Type (<)table(>)
If destination,press Return and Tab to distinguish the row elements.These won't affect display in the browser
Type (<)tr(>) to define the beginning of the first row.
Type (<)td(>) to define the beginning of the first cell.
Type the contents of the first cell
Type (<)/td(>) to complete the cell.
Repeat the steps 4-6 for each cell in the row.
Type (<)/tr(>) to complete the row.
Repeat the steps 2-7 for each row.
To finish the table, type (<)/table(>)
Adding a Border
To create a border with (X)HTML:
Inside the initial table tag type border .
If desired,type ="n" ,where n is the thickness in pixels of the border.
To create a border with styles:
In your style sheet,type table or td ,or whichever selector denotes the part of the table you want to apply the border to.
Type {border:value} , were border is the border property that you wish to apply and value is the type of border you want.
Setting a Width
To set the width of a cell or table:
In the td or table tag,type width="n" , where n is the desired width of the cell or of the entire table, in pixels.
Or type with="n%" , where n is the percentage of the browser window that the table should occupy.
To set the width with styles:
In the style sheet, type width:value where value is the desired width.
Centering a Table
To center a table with (X)HTML:
In the table tag, type align="center"
To center a table with CSS:
Make sure you've specified the width of the table.
Add margin-right:auto and margin left:auto to the style rule for the table