![]() |
HTML Basics:
|
|
||||
![]() |
You can use HTML tables to display data in rows and columns. Tables are also used to line up text and images in some ways that are not possible using the attributes for the tags. A table is made up of rows of cells. So it takes three basic tags to create a table:
The cell tags are nested between the row tags and all rows are nested between the table tags. The code on the left below produces the table on the right:
The indentions in the code are not required, but do help make the code easier to read. |
![]() |
Project 2: HTML Basics |
||||||||
Dimensions in TablesIt is difficult to fix a table or its parts to precise sizes. HTML is designed to allow the browser a lot of flexibility in displaying the page. So, this is a "feature" rather than a "problem". Tables and cells have a strong tendency to collapse or expand to the smallest space required to show what is in them. Frustrating! Read on to see how this works in different situations. Cell Size:Expanding: A table cell will expand to hold what you put in it - even if you have set specific cell dimensions in the code!
Collapsing: A table cell will collapse when there is nothing in the cell.
Column Width / Row Height:
|
![]() |
~~ 1 Cor. 10:31 ...whatever you do, do it all for the glory of God. ~~ |